Cocoapods警告 - CocoaPods没有设置项目的基本配置,因为您的项目已经有自定义配置集

本文翻译自:Cocoapods Warning - CocoaPods did not set the base configuration of your project because because your project already has a custom config set

After I execute a pod install at the base of my project, I get the following error: 在我的项目基础上执行pod install后,我收到以下错误:

CocoaPods did not set the base configuration of your project because because your project already has a custom config set. CocoaPods没有设置项目的基本配置,因为您的项目已经有自定义配置集。 In order for CocoaPods integration to work at all, please either set the base configurations of the target BluePlaquesLondonFramework to Pods/Target Support Files/Pods/Pods.debug.xcconfig or include the Pods/Target Support Files/Pods/Pods.debug.xcconfig in your build configuration. 为了使CocoaPods集成完全可用,请将目标BluePlaquesLondonFramework的基本配置设置为Pods/Target Support Files/Pods/Pods.debug.xcconfig或者包括Pods/Target Support Files/Pods/Pods.debug.xcconfig在您的构建配置中。

This probably sounds like a silly question, but how do I set the base configuration for a target? 这可能听起来像一个愚蠢的问题,但我如何设置目标的基本配置?

https://github.com/seanoshea/BluePlaquesLondon/blob/ios8/Podfile is the Podfile which is causing this issue. https://github.com/seanoshea/BluePlaquesLondon/blob/ios8/Podfile是导致此问题的Podfile。

http://github.com/seanoshea/BluePlaquesLondon on the iOS 8 branch is the Podfile in question if you're curious to see what the project looks like. iOS 8分支上的http://github.com/seanoshea/BluePlaquesLondon是一个有问题的Pod文件,如果你很想知道项目的样子。


#1楼

参考:https://stackoom.com/question/1mITX/Cocoapods警告-CocoaPods没有设置项目的基本配置-因为您的项目已经有自定义配置集


#2楼

Go into XCode and open your project settings and under the Info tab, you will see "Configurations" where you can set a configuration file for both Debug and Release. 进入XCode并打开项目设置,在Info选项卡下,您将看到“Configurations”,您可以在其中为Debug和Release设置配置文件。 You apparently have already set these to some custom config and CocoaPods wants/needs you to use the Pods config. 您显然已将这些设置为某些自定义配置,CocoaPods希望/需要您使用Pods配置。

这是一个屏幕截图


#3楼

The line in the podfile that is generating a problem is : link_with ['BluePlaquesLondon', 'BluePlaquesLondonFramework']. podfile中产生问题的行是:link_with ['BluePlaquesLondon','BluePlaquesLondonFramework']。

Just make this : link_with ['BluePlaquesLondon'] or this (worked in my case, hope it will in yours :-)) : 只需这样:link_with ['BluePlaquesLondon']或者这个(在我的情况下工作,希望它会在你的:-)):

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'

xcodeproj 'BluePlaquesLondon.xcodeproj'
inhibit_all_warnings!
link_with ['BluePlaquesLondon']

def import_pods

     pod 'TTTAttributedLabel', '~> 1.10.1'
     pod 'GoogleAnalytics-iOS-SDK', '~> 3.0.9'
     pod 'Google-Maps-iOS-SDK'
     pod 'IntentKit'
     pod 'HCViews'
     pod 'SVProgressHUD', :head
     pod 'iRate'
     pod 'iOS-KML-Framework', :git => 'https://github.com/FLCLjp/iOS-KML-Framework.git'

end

import_pods

target "BluePlaquesLondonFramework" do
    import_pods
    pod 'Kiwi'
end

#4楼

I had the same error while pod install. pod安装时我遇到了同样的错误。 I tried everything (reinstall pod, update all gems, etc.) and I found solution worked in my case. 我尝试了一切(重新安装pod,更新所有宝石等),我发现解决方案适用于我的情况。 There was problem because of changing target's name. 由于更改了目标的名称,因此存在问题。 In this case solution is simple: 在这种情况下解决方案很简单:

  1. Click Product -> Scheme -> Manage Schemes... 单击产品 - >方案 - >管理方案...
  2. Click on your target on the list and delete it with "-" sign on bottom of window. 单击列表中的目标并使用窗口底部的“ - ”符号将其删除。
  3. Click "+" to add target back to list. 单击“+”将目标添加回列表。 Choose correct target and name. 选择正确的目标和名称。

After all everything should works. 毕竟一切都应该有效。


#5楼

In case you are using custom config you can follow the suggestion in the warning and include the Pod config in your config file 如果您使用的是自定义配置,则可以按照警告中的建议进行操作,并在配置文件中包含Pod配置

     #include "Pods/Target Support Files/Pods-YYY/Pods-YYYY.develop-archive.xcconfig"

This will NOT stop the warnings but will allow you to use your private config (there is an open bug on the warning with CocoaPods project) https://github.com/CocoaPods/CocoaPods/issues/2633 这不会停止警告,但会允许你使用你的私人配置(CocoaPods项目的警告有一个开放的bug) https://github.com/CocoaPods/CocoaPods/issues/2633


#6楼

I had the same problem, but in Xcode 6.1.1 - what fixed it for me was to change the configuration file setting to None for the two Pods-related targets, then run pod install again. 我有同样的问题,但在Xcode 6.1.1中 - 为我修复的是将两个Pods相关目标的配置文件设置更改为None ,然后再次运行pod install

The configuration file setting is found by selecting the project (not the target) and then the Info tab. 通过选择项目(而不是目标),然后选择“信息”选项卡,可以找到配置文件设置。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值