我有另一个项目,当我安装pod时,控制台告诉我:
Analyzing dependencies
[!] The dependency `MMDrawerController (~> 0.5.7)` is not used in any concrete target.
The dependency `ViewUtils` is not used in any concrete target.
The dependency `CPAnimationSequence` is not used in any concrete target.
The dependency `iCarousel` is not used in any concrete target.
The dependency `BlocksKit (~> 2.2.5)` is not used in any concrete target.
The dependency `AFNetworking` is not used in any concrete target.
The dependency `MBProgressHUD (~> 0.8)` is not used in any concrete target.
The dependency `NSString-UrlEncode` is not used in any concrete target.
The dependency `INTULocationManager` is not used in any concrete target.
The dependency `SDWebImage (= 3.7.2)` is not used in any concrete target.
The dependency `Adjust (from `https://github.com/adjust/ios_sdk.git`, tag `v3.4.0`)` is not used in any concrete target.
The dependency `TARTT (from `https://github.com/takondi/tartt-sdk-ios.git`)` is not used in any concrete target.
The dependency `SIAlertView (~> 1.3)` is not used in any concrete target.
The dependency `GoogleAppIndexing` is not used in any concrete target.
The dependency `Gimbal` is not used in any concrete target.
有什么问题? 因为该项目有超过20个traget,他们使用post_install模式并且工作正常,但它对我不起作用。
我的cocoapod版本是1.1.1,请帮忙。
这是Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
pod 'MMDrawerController', '~> 0.5.7'
pod 'ViewUtils'
pod 'CPAnimationSequence'
pod 'iCarousel'
pod 'BlocksKit', '~> 2.2.5'
pod 'AFNetworking'
pod 'MBProgressHUD', '~> 0.8'
pod 'NSString-UrlEncode'
pod 'INTULocationManager'
pod 'SDWebImage', '3.7.2'
pod 'Adjust', :git => 'https://github.com/adjust/ios_sdk.git', :tag => 'v3.4.0'
pod 'TARTT', :git => 'https://github.com/takondi/tartt-sdk-ios.git'
pod 'SIAlertView', '~> 1.3'
pod 'GoogleAppIndexing'
pod 'Gimbal'
post_install do |installer_representation|
installer_representation.project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
end
end
end
答案 0 :(得分:39)
您的Podfile
应包含您要安装cocoapods的目标的信息。 Podfile中的帖子安装程序仅在每个目标中为ACTIVE_ARCH
设置NO
标记。
如果您的应用中有超过20个目标(当前Podfile中有一些混乱),可能会尝试删除Podfile
和Podfile.lock
,然后执行pod init
。它将使CococaPods gem为您的应用创建有效的Podfile
。然后粘贴应用程序使用的CocoaPods并将post installer指令粘贴到新的Podfile,并尝试使用pod install
重新安装cocoapods。
请记住将pod说明放在正确的目标之间。
查看关于Podfile的CocoaPods site。
所以你的Podfile应该是这样的:
target 'YourTargetName' do
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
pod 'MMDrawerController', '~> 0.5.7'
pod 'ViewUtils'
pod 'CPAnimationSequence'
pod 'iCarousel'
pod 'BlocksKit', '~> 2.2.5'
pod 'AFNetworking'
pod 'MBProgressHUD', '~> 0.8'
pod 'NSString-UrlEncode'
pod 'INTULocationManager'
pod 'SDWebImage', '3.7.2'
pod 'Adjust', :git => 'https://github.com/adjust/ios_sdk.git', :tag => 'v3.4.0'
pod 'TARTT', :git => 'https://github.com/takondi/tartt-sdk-ios.git'
pod 'SIAlertView', '~> 1.3'
pod 'GoogleAppIndexing'
pod 'Gimbal'
post_install do |installer_representation|
installer_representation.project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
end
end
end
end
答案 1 :(得分:31)
只需在下面的块中添加您的pod文件
target 'YourApp' do
pod '*******', '~> 1.0'
end
答案 2 :(得分:0)
这有点奇怪,但Gimbal SDK包含iCarousel所以它可能会对你的podfile有问题。