Ios 在私有cocoapod中包含本地化的xib文件
所以我觉得这应该很容易,但在谷歌搜索和玩了一天之后,我似乎仍然无法让它工作。我有一个私有cocoapod,它从私有git存储库下载代码。这是所有的设置和工作良好 我正在努力解决的是,我需要在cocoapod中加入本地化的XIB。我有一个LoginView,它在我们的许多内部应用程序中共享代码。然而,我们对该视图进行了本地化。从cocoapods使结构变平的方式可以看出,它只是复制了本地化的xib,这导致*.lproj目录丢失。当我尝试使用cocoapod时,无论设备上的语言设置如何,它似乎都会拾取第一个xib 我希望有人能指导我如何保留文件夹继承权,或者是否有其他方法将局部XIB纳入cocoapodIos 在私有cocoapod中包含本地化的xib文件,ios,localization,xib,cocoapods,Ios,Localization,Xib,Cocoapods,所以我觉得这应该很容易,但在谷歌搜索和玩了一天之后,我似乎仍然无法让它工作。我有一个私有cocoapod,它从私有git存储库下载代码。这是所有的设置和工作良好 我正在努力解决的是,我需要在cocoapod中加入本地化的XIB。我有一个LoginView,它在我们的许多内部应用程序中共享代码。然而,我们对该视图进行了本地化。从cocoapods使结构变平的方式可以看出,它只是复制了本地化的xib,这导致*.lproj目录丢失。当我尝试使用cocoapod时,无论设备上的语言设置如何,它似乎都会拾
#
# Be sure to run `pod lib lint NAME.podspec' to ensure this is a
# valid spec and remove all comments before submitting the spec.
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = "ios-XX-common"
s.version = "1.0"
s.summary = "XXXXXX"
s.description = "Pod containing common source code used across multiple apps"
s.homepage = "http://www.example.com"
s.license = 'Copyright'
s.author = { xxx }
s.source = { :git => "xxxx:/data/git/ios-xx-common.git", :tag => 'v1.0'}
s.platform = :ios, '7.0'
s.requires_arc = false
s.header_dir = 'ios-xx-common'
s.header_mappings_dir = 'CommonSourceCode'
s.source_files = "CommonSourceCode/**/*.{h,m}", "CommonSourceCode/CustomUIObjects/**/*.{h,m}",
"CommonSourceCode/Data Objects/**/*.{h,m}", "CommonSourceCode/Helpers/**/*.{h,m}",
"CommonSourceCode/UID/**/*.{h,m}", "CommonSourceCode/UIViews/**/*.{h,m}",
"CommonSourceCode/ViewControllers/**/*.{h,m}"
s.resource_bundles = { 'rr-common-xibs' => ['CommonResources/Xibs/*.lproj'],
'rr-common-other' => ['CommonResources/Icons/*.*', 'CommonResources/IPhone/*.*', 'CommonResources/IPhoneIPad/*.*', 'CommonResources/Sounds/*.*'] }
s.public_header_files = '**/*.h'
s.dependencies = { 'Parse-iOS-SDK' => '~> 1.2.19', 'CocoaLumberjack' => '~> 1.7.0',
'MBProgressHUD' => '~> 0.8', 'AFNetworking' => '~> 1.0' }
end
谢谢我想你可能想要“发展播客” 所以我有两个项目,一个图书馆项目和一个特定于应用程序的项目。 在我的库项目中,我有一个library.podspec文件
Pod::Spec.new do |s|
s.name = "Library"
s.version = "0.0.1"
s.summary = "Shared library."
s.description = "This is an iOS library for shared common code across all apps"
s.homepage = "http://blah.com"
s.license = 'COMMERCIAL'
s.author = { "My name" => "my@email.com" }
s.social_media_url = "http://twitter.com/blah"
s.platform = :ios, '8.0'
s.source = { :git => "https://bitbucket.org/blah/library.git", :tag => '0.0.1' }
s.source_files = 'Library/Classes/**/*.{h,m}', 'Library/Models/**/*.{h,m}', 'Library/ViewModels/**/*.{h,m}', 'Library/Views/**/*.{h,m}'
s.resources = "Library/Images/**/*.png", "Library/Images/**/*.jpg", 'Library/Views/**/*.xib', "Library/Fonts/*.otf"
s.requires_arc = true
s.framework = 'MapKit', 'CoreLocation'
s.dependency 'AFNetworking'
s.dependency 'ReactiveCocoa'
s.dependency 'JLRoutes'
end
然后在我的特定应用程序项目的播客文件中
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
link_with 'Myapp', 'Myapp-Tests'
pod 'Library', :path => '../library/'
现在,当我为我的特定应用程序项目运行“pod update”时,我可以在pod项目下看到,而不是在Pods下看到,我有一个名为Development Pods的新文件夹。
请注意,如果在库项目中添加新文件,请确保再次更新pod
和平。这就是你想要的吗?