【发布时间】:2014-09-02 16:17:22
【问题描述】:
所以我认为这应该很容易,但是经过一天的谷歌搜索和玩耍后,我似乎仍然无法正常工作。我有一个私人 cocoapod,它从私人 git 存储库下载代码。这是所有设置并且工作正常。
我正在努力解决的是我需要在 cocoapod 中包含本地化的 xib。我有一个 LoginView,它是我们许多内部应用程序之间的共享代码。但是,我们有视图的本地化版本。据我所知,由于 cocoapods 使结构变平的方式,它只是复制了本地化的 xib,这导致 *.lproj 目录丢失。然后,当我尝试使用 cocoapod 时,无论设备上的语言设置如何,它似乎都会拿起第一个 xib。
我希望有人能够指导我如何保留文件夹 heirachy,或者是否有另一种方法可以将本地化的 xibs 包含到 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
谢谢
【问题讨论】:
标签: ios localization xib cocoapods