Pod安装,依赖“*****”不用于任何具体目标 [英] Pod install, The dependency `*****` is not used in any concrete target

查看:161
本文介绍了Pod安装,依赖“*****”不用于任何具体目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有另一个项目,当我安装pod时,控制台告诉我:

i have a project from another, when i pod install, the console tell me:

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模式并且工作正常,但它对我不起作用。

what is the problem? because the project has more then 20 traget, they use post_install pattern and works fine, but it don't work for me.

我的cocoapod版本是1.1 .1,请帮助。

my cocoapod version is 1.1.1, pls help.

这里是Podfile:

here is the 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设置中的帖子安装程序仅 ACTIVE_ARCH 标记到每个目标中的

Your Podfile should contains information in which target you want to install the cocoapods. The post installer in your Podfile setting only ACTIVE_ARCH flag to NO in each target.

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

If you have more than 20 targets in your app(and some mess in current Podfile), maybe try to remove Podfile and Podfile.lock and then do pod init. It will make CococaPods gem create a valid Podfile for your app. Then paste the CocoaPods that your app using and paste the post installer instruction to the new Podfile and try to reinstall cocoapods using pod install.

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

Remember to place pod instructions between correct target.

查看 CocoaPods网站

所以你的Podfile应该是这样的:

So your Podfile should look like:

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安装,依赖“*****”不用于任何具体目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆