ios - Pod 安装,依赖项 `*****` 未在任何具体目标中使用

标签 ios cocoapods cocoapods-1.1.1

在项目上执行 pod install 时,我得到以下输出:

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 个目标和 post_install 模式是否会导致问题?

我的 CocoaPod 版本是 1.1.1。

这是 Pod 文件:

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 标志设置为 NO

如果您的应用程序中有超过 20 个目标(并且当前 Podfile 中有些困惑),也许尝试删除 PodfilePodfile.lock 然后执行 pods 初始化。它将使 CococaPods gem 为您的应用程序创建一个有效的 Podfile。然后粘贴您的应用程序使用的 CocoaPods,并将安装后指令粘贴到新的 Podfile,并尝试使用 pod install 重新安装 cocoapods。

请记住将 pod 指令放在正确的目标之间。

查看CocoaPods site关于 Podfile。

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

关于ios - Pod 安装,依赖项 `*****` 未在任何具体目标中使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40234810/

相关文章:

ios - 更新到 1.0.0 后 cocoapods link_with 出错

ios - 使用未解析的标识符 'PhoneAuthProvider'

ios - 将 react-native 升级到 0.39.0 及更高版本时出现重复符号错误

Cocoapods 1.1.1 目标覆盖 `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES`

iOS - 带有圆形手势的图像裁剪

objective-c - 无法在我的 iPad 模拟器中显示正确的 URL

ios - OCMock传递任何CGSize

uikit - 自 Xcode 5.1 以来无法在 cocoapods 中构建模块 'UIKit"

ios - 如何提供TestFlight iOS beta应用程序的反馈?