I have been using CocoaPods for a few weeks now with my iOS app and it works perfectly with the one target I have been testing (let's call it "MainApp"). However, I now want to build a different target ("MyAppLite") and noticed that the build failed (file not found on one of the pods' header files).
The differences in the Build Settings I've noticed are as follows:
How can I ensure that when I run pod install
, all targets have the libraries linked?
For reference, here is my Podfile:
platform :ios, '5.0'
pod 'TTTAttributedLabel', '~> 1.7.0'
pod 'iRate', '~> 1.7.5'
pod 'MBProgressHUD', '~> 0.6'
pod 'FlurrySDK', '~> 4.2.3'
pod 'ACSimpleKeychain', '~> 0.0.1'
pod 'WEPopover', '~> 0.0.1'
pod 'AFNetworking', '~> 1.3.1'
pod 'Nimbus', '~> 1.0.0'
pod 'QuincyKit', '~> 2.1.9'
Whether or not you check in your Pods folder is up to you, as workflows vary from project to project. We recommend that you keep the Pods directory under source control, and don't add it to your . gitignore.
For CocoaPods 1.0.0, recommendation from devs is using abstract_target
(but not compatible with 0.39.0):
platform :ios, '5.0'
abstract_target 'defaults' do
pod 'TTTAttributedLabel', '~> 1.7.0'
pod 'iRate', '~> 1.7.5'
pod 'MBProgressHUD', '~> 0.6'
pod 'FlurrySDK', '~> 4.2.3'
pod 'ACSimpleKeychain', '~> 0.0.1'
pod 'WEPopover', '~> 0.0.1'
pod 'AFNetworking', '~> 1.3.1'
pod 'Nimbus', '~> 1.0.0'
pod 'QuincyKit', '~> 2.1.9'
target 'MyApp'
target 'MyAppLite'
end
For CocoaPods 0.39.0 + 1.0.0 compatibility, using def
works fine (but isn't recommended by devs):
platform :ios, '5.0'
def default_pods
pod 'TTTAttributedLabel', '~> 1.7.0'
pod 'iRate', '~> 1.7.5'
pod 'MBProgressHUD', '~> 0.6'
pod 'FlurrySDK', '~> 4.2.3'
pod 'ACSimpleKeychain', '~> 0.0.1'
pod 'WEPopover', '~> 0.0.1'
pod 'AFNetworking', '~> 1.3.1'
pod 'Nimbus', '~> 1.0.0'
pod 'QuincyKit', '~> 2.1.9'
end
target 'MyApp' do
default_pods
end
target 'MyAppLite' do
default_pods
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With