sea*_*hea 320 xcode ios cocoapods
在pod install我的项目基础上执行a后,我收到以下错误:
CocoaPods没有设置项目的基本配置,因为您的项目已经有自定义配置集.为了使CocoaPods集成完全可用,请将目标的基本配置设置
BluePlaquesLondonFramework为Pods/Target Support Files/Pods/Pods.debug.xcconfig或包含Pods/Target Support Files/Pods/Pods.debug.xcconfig在构建配置中.
这可能听起来像一个愚蠢的问题,但我如何设置目标的基本配置?
https://github.com/seanoshea/BluePlaquesLondon/blob/ios8/Podfile是导致此问题的Podfile.
iOS 8分支上的http://github.com/seanoshea/BluePlaquesLondon是一个有问题的Pod文件,如果你很想知道项目的样子.
Tim*_*imD 569
我遇到了同样的问题,但在Xcode 6.1.1中 - 为我修复的是将配置文件设置更改None为两个与Pods相关的目标,然后pod install再次运行.
通过选择项目(而不是目标),然后选择"信息"选项卡,可以找到配置文件设置.
Swi*_*ect 147
一步步
Info
rm -rf Pods/ Podfile.lock ; pod install一旦你允许pod install一步一步7做到这一点,你就可以使用自定义配置并更改配置.
qua*_*ark 136
进入XCode并打开项目设置,在Info选项卡下,您将看到"Configurations",您可以在其中为Debug和Release设置配置文件.您显然已将这些设置为某些自定义配置,CocoaPods希望/需要您使用Pods配置.

小智 68
陷入同样的问题.它将建立在模拟器上但不在我的设备上.没有一个答案能解决这个问题.这是我拼凑出一些答案的方法:
更改了我的pods文件以使用特定目标:
target :MyProject do
pod 'AWSCognitoSync'
pod 'Facebook-iOS-SDK'
end
Run Code Online (Sandbox Code Playgroud)Ran pod安装
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `MyProject` to `Pods/Target Support Files/Pods-MyProject/Pods-MyProject.debug.xcconfig` or include the `Pods/Target Support Files/Pods-MyProject/Pods-MyProject.debug.xcconfig` in your build configuration.Tom*_* C. 34
仔细阅读错误消息后,我解决了问题:
[!] CocoaPods 没有设置您项目的基本配置,因为您的项目已经有一个自定义配置集。为了让 CocoaPods 集成正常工作,请将目标的基本配置设置
Runner为Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig或包含Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig在您的构建配置中 (Flutter/Release.xcconfig)。
解决方案
打开 Xcode 并将 Runner Info Base Configurations 更改为相关的 Pods-Runner.profile.xconfig。
退出 Xcode
终端:从 ios 项目文件夹运行pod deintegrate
验证 Pod 是否已删除
Project has been deintegrated. No traces of CocoaPods left in project.
Note: The workspace referencing the Pods project still remains.
Run Code Online (Sandbox Code Playgroud)
终端:从 ios 项目文件夹运行pod install
(来自此原文 - 不好)
(到这个GOOD设置)
笔记
我无法
Flutter/Release.xcconfig使用错误消息中提到的将 xconfig 文件包含在配置文件中的第二个建议来解决该问题 。
qix*_*qix 31
对于那些来自 Flutter 世界的人来说,这是一条误导性的错误消息,暗示了不必要的操作,正确的做法是忽略该错误并使用 cli flutter(而不是pod),如https://github.com/flutter/flutter中所述/问题/73845:
Gatzsche 说更好的信息是:
在 Flutter pod install 中不应手动调用。
flutter clean要运行 pod install ,请执行以下命令flutter pub get和flutter build ios。
jmagman 注释:
正如您所指出的,错误消息建议执行不必要的操作。flutter 命令会抑制来自 pod 的该消息。您直接运行 pod,这不是推荐的工作流程。我们无法控制来自 CocoaPods 的错误消息,并且 flutter 命令行工具已经抑制了令人困惑的消息。
ReD*_*ion 16
您还应该确保根目录中没有pod Podfile,您应该定义许多目标中使用的所有pod:
def shared_pods
pod 'ReactiveCocoa', '~> 2.5'
end
target 'app' do
shared_pods
pod 'RestKit'
end
target 'tests' do
shared_pods
pod 'OCMock'
end
Run Code Online (Sandbox Code Playgroud)
您还可能需要从目标依赖项中删除libPods.a并libPods-app.a执行清理,然后pod install再次运行.
我在添加一些自定义构建配置后遇到了这个问题.我可以看到:
Pods (target) > Target Support Files > Pods
Run Code Online (Sandbox Code Playgroud)
它实际上创建了xcconfig与新构建配置匹配的新文件但由于某种原因我无法在我的应用程序的项目目标中选择这些.
为我修复的是安装和使用cocoapods-deintegrate:
gem install cocoapods-deintegrate
Run Code Online (Sandbox Code Playgroud)
然后运行:
pod deintegrate
Run Code Online (Sandbox Code Playgroud)
其次是:
pod install
Run Code Online (Sandbox Code Playgroud)
小智 7
podfile中产生问题的行是:link_with ['BluePlaquesLondon','BluePlaquesLondonFramework'].
只需这样: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
Run Code Online (Sandbox Code Playgroud)
In case you are using custom config you can follow the suggestion in the warning and include the Pod config in your config file
#include "Pods/Target Support Files/Pods-YYY/Pods-YYYY.develop-archive.xcconfig"
Run Code Online (Sandbox Code Playgroud)
这不会停止警告,但将允许您使用您的私人配置(CocoaPods 项目的警告有一个开放的错误) https://github.com/CocoaPods/CocoaPods/issues/2633
如果您为现有项目添加了自定义构建配置,Cocoapods会抱怨它.
Cocoapods将Pods/Target Support Files/<build_target>在命名模式后面的目录下自动创建xcconfig文件Pods-<build_target>.<build_config>.xcconfig.
只需确保在Xcode中手动将这些文件添加到项目中(在Pods目录下,但不在Pods项目中!).包含这些文件后,在Xcode中选择项目,转到"信息"选项卡,然后展开自定义配置.为自定义配置下的每个目标选择适当的xcconfig文件.
小智 5
我在安装 pod 时遇到了同样的错误。我尝试了一切(重新安装 pod,更新所有 gems 等),我发现解决方案对我的情况有效。由于更改目标名称而出现问题。在这种情况下,解决方案很简单:
毕竟一切都应该有效。