Pod安装,依赖“*****”不用于任何具体目标

我有另一个项目,当我安装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 

您的Podfile应包含要安装cocoapods的目标的信息。 Podfile中的post安装程序仅在每个目标ACTIVE_ARCH标记为NO

如果您的应用程序中有超过20个目标(以及当前Podfile中的一些混乱),可能尝试删除PodfilePodfile.lock ,然后执行pod init 。 它将使CococaPods gem为您的应用程序创建有效的Podfile 。 然后粘贴应用程序使用的CocoaPods并将post installer指令粘贴到新的Podfile,并尝试使用pod install重新安装cocoapods。

请记住将pod说明放在正确的目标之间。

查看有关Podfile的CocoaPods站点 。

所以你的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 

只需在下面的块中添加您的pod文件

 target 'YourApp' do pod '*******', '~> 1.0' end 

这有点奇怪,但Gimbal SDK包含iCarousel,所以它可能有你的podfile问题。

资源