在我的项目的基础上执行pod安装后,我得到以下错误:

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就是这个问题中的Podfile。


进入XCode,打开你的项目设置,在信息选项卡下,你会看到“配置”,在这里你可以设置调试和发布的配置文件。显然,您已经将这些设置为一些自定义配置,CocoaPods希望/需要您使用Pods配置。


播客文件中产生问题的行是: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

我在安装吊舱时也犯了同样的错误。我尝试了所有方法(重新安装pod,更新所有宝石等),并找到了适合我的解决方法。因为改变目标的名字,所以出现了问题。在这种情况下,解决方案很简单:

单击“产品->方案->管理方案…” 单击列表上的目标,并在窗口底部用“-”符号删除它。 点击“+”将目标添加回列表。选择正确的目标和名称。

毕竟,一切都应该正常工作。


如果您正在使用自定义配置,您可以按照警告中的建议,将Pod配置包含在配置文件中

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

这将不会停止警告,但将允许您使用您的私人配置(在CocoaPods项目的警告上有一个开放的错误) https://github.com/CocoaPods/CocoaPods/issues/2633


我也遇到了同样的问题,但是在Xcode 6.1.1中-为我修复它的是将两个pod相关目标的配置文件设置更改为None,然后再次运行pod install。

通过选择项目(而不是目标),然后选择Info选项卡,可以找到配置文件设置。


也遇到了同样的问题。它可以建立在模拟器上,但不是在我的设备上。没有一个答案能帮我解决这个问题。以下是我将一些答案拼凑在一起的方法:

Changed my pods file to use a specific target: target :MyProject do pod 'AWSCognitoSync' pod 'Facebook-iOS-SDK' end Ran pod install That gives an error: [!] 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. Go Project settings and click on Info tab. There will be an error where it cannot find the Configuration file. Set it to "None" for Debug and Release. Run pod install yet again Clean and build. This works.


如果您在现有项目中添加了自定义构建配置,Cocoapods将对此提出抱怨。

Cocoapods会自动在Pods/Target Support files /<build_target>目录下创建xcconfig文件,命名模式为Pods-<build_target>.<build_config>.xcconfig。

只要确保在Xcode中手动将这些文件添加到你的项目中(在Pods目录下,但不是在Pods项目中!)一旦包含了这些文件,在Xcode中选择你的项目,进入“信息”选项卡,展开你的自定义配置。为自定义配置下的每个目标选择适当的xcconfig文件。


你还应该确保在Podfile的根目录中没有pod,你应该像这样定义在许多目标中使用的所有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

您还可能需要删除libPods。libPods-app. a和libPods-app。A从目标依赖项,执行一个清洁,然后运行pod安装再次。


Add the relevent xcconfig files to your project. Cocoapods will have created them but you can't set them in Xcode until they are in the project. You probably want to add them to the Pods group where the other pods xcconfig files are. Right click and add files. Search for xcconfig files in your project folder or look in Pods/Target Support Files/[TARGET_NAME]/ (I have different cocoapods configured for each target (extension and main project this may be slightly different in your case) Go to project configurations in the Info of your main project For each target and configuration set the appropriate pods configuration. pod install again and you should see no errors.


我能够通过以下方法在XCode 6上构建这个问题所涉及的项目:

从项目导航器中选择项目 选择项目而不是目标 转到信息选项卡 从组合框中选择Pods.(调试/释放)配置文件。

希望这能帮助到一些人。


最简单的解决方案(在多次遇到这个问题后):

删除Podfile & Podfile。锁从你的项目库(保存Podfile的地方,这样你可以很容易地粘贴到新的Podfile) 运行'pod init' 编辑“Podfile”到你的遗嘱(添加你正在使用的pods) 运行'pod install'

这将在几分钟内重新创建所有内容并工作(不花费时间对“错误”进行逆向工程)。


我只是在添加一些自定义构建配置后遇到了这个问题。我能看到下面:

Pods (target) > Target Support Files > Pods

它实际上已经创建了新的xcconfig文件,匹配新的构建配置,但由于某种原因,我无法在我的应用程序的项目目标中选择这些文件。

对我来说,固定它的是安装和使用椰子荚分解:

gem install cocoapods-deintegrate

然后运行:

pod deintegrate

紧随其后的是:

pod install

别瞎捣鼓了,重置。

循序渐进的

显示项目导航器 选择项目 选择信息 在Configurations中,选择每个目标,一次一个(Debug, ApplicationUnitTest, Release,等等),对于每个目标,将configuration设置为None。 确保“基于配置文件”为每个配置读取0配置集或无配置集。这是关键所在。 Xcode辞职 rm -rf Pods/ Podfile。锁;圆荚体安装


一旦你允许pod安装在第7步中发挥它的魔力,你就可以使用自定义配置并更改配置。


这发生在我身上是因为我已经有了Pod配置。我是iOS开发的新手,在搜索安装Alamofire + SwiftyJSON的说明时,无意中安装了不止一次库。对我来说,起作用的是:在“Pods”项目的“目标支持文件”文件夹中,我选择了两个正确的。xcconfig文件,并将它们拖到我的应用程序项目的“Pods”文件夹中。这允许在基本配置上选择正确的配置文件。

但是,如果我再次运行“pod install”,警告将更改为先前的.xcconfig文件。我试图从主项目中删除文件和旧的框架,但当我再次运行前面的命令时,给了我同样的警告,并在我的应用程序项目的“Pods”文件夹下创建文件“Pods.framework”。我忽略了它,尽管有两个框架,但它似乎运行正常。我不知道这是否正确,如果存在解决方案,它将受到欢迎。


我把pod文件里的pod从目标移到了外面。文件更改如下:

# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!

target 'MyProject' do

pod 'Firebase', '>= 2.5.0'
pod 'Onboard'
pod 'GoogleMaps'
pod 'IQDropDownTextField'

end

:

# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!

pod 'Firebase', '>= 2.5.0'
pod 'Onboard'
pod 'GoogleMaps'
pod 'IQDropDownTextField'

target 'MyProject' do

end

所以对我来说,这个问题是由于前面提到的xcconfig文件名在Swift 3更新发生之前被更改了。

有些东西是不同步的,所以Cocoapods创建了一个“恢复引用”文件夹部分与旧的命名文件,并链接到它们。

为了解决这个问题,我:

删除了“恢复的引用”文件夹和包含旧的 Xcode和文件系统中的.xcconfig文件 Xcode辞职 运行pod安装

从那以后,一切都为我处理好了,警告也消失了。


我错了:

diff: /../Podfile.lock: No such file or directory diff: /Manifest.lock: No such file or directory error: The sandbox is not in sync with the Podfile.lock.

我只是检查了我安装吊舱的路径,并纠正了它,重新安装,它只是工作。

确保在.xcodeproj或.xcworkspace(如果已经存在的话)存在的位置前面给出路径。


在仔细阅读错误消息后,我修复了我的问题:

[!CocoaPods没有设置项目的基本配置 因为您的项目已经有一个自定义配置集。为了 CocoaPods集成工作的全部,请任意设置基础 目标Runner的配置到目标支持文件/ pod -Runner/Pods-Runner.profile。xcconfig或包含目标支持文件/Pods-Runner/Pods-Runner.profile。构建中的Xcconfig 配置(颤振/ Release.xcconfig)。

解决方案

打开Xcode,将Runner Info Base Configurations更改为 Pods-Runner.profile.xconfig有关。 Xcode辞职 终端:从ios项目文件夹运行pod deintegrate 验证pod已移除 项目已经解体。项目中没有CocoaPods的痕迹。 注意:引用Pods项目的工作区仍然存在。 终端:在ios项目文件夹中运行pod install

(来自原文- BAD)

(到此GOOD设置)

笔记

我还没能用第二种方法解决这个问题 建议将xconfig文件包含在 颤振/释放。Xcconfig配置文件中提到的 错误消息。


只需遵循Android Studio的说明。 这是错误输出:

"[!] 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 `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` in your build configuration (`Flutter/Release.xcconfig`)."

在android studio IDE中,进入IOS文件夹/Flutter,打开文件Release.xconfig

过了这条线:

Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig

删除podfile。锁定并尝试在Xcode中重建。为我工作。


Sorry my previous answer was unclear. This was just one of many errors i've got while trying to set up Cloud Firestore, so this answer is specific for that situation. In order to solve this error and make firebase work, eventually, you have to follow all of the steps from this page: https://firebase.flutter.dev/docs/firestore/overview/ . If you are having problems with generating the 'firebase_options.dart' file, then you need to follow the steps on this page: https://firebase.google.com/docs/cli#mac-linux-auto-script . The last step is optional, but it reduces build time, and I really don't know how or why, but it made some of other errors also disappear... Step 4. Improve iOS & macOS build times, from this page https://firebase.flutter.dev/docs/firestore/overview/. And off course, don't forget to add dependencies in pubspec.yaml: https://pub.dev/packages/firebase_core/install . There is also a great comment here about using Firebase.initializeApp() : https://stackoverflow.com/a/63492262/17626190


对于那些来自Flutter世界的人来说,这是一条误导性的错误消息,建议执行不必要的操作,正确的做法是忽略错误并使用Flutter cli(而不是pod),如https://github.com/flutter/flutter/issues/73845:中所述

Gatzsche说,更好的信息应该是:

在颤振吊舱安装不应手动调用。运行pod install 执行以下命令颤振清除,颤振pub get和 颤振构建ios。

杰马格曼指出:

正如您所指出的,错误消息建议执行不必要的操作。颤振命令抑制来自吊舱的消息。您直接运行pod,这不是一个推荐的工作流。我们无法控制来自CocoaPods的错误消息,并且flutter命令行工具已经抑制了令人困惑的消息。


这是我在运行pod安装或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 `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.debug-staging.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.debug-staging.xcconfig` in your build configuration (`Flutter/Debug.xcconfig`).

[!] 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 `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.release-staging.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.release-staging.xcconfig` in your build configuration (`Flutter/Release.xcconfig`).

[!] 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 `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.profile-staging.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.profile-staging.xcconfig` in your build configuration (`Flutter/Release.xcconfig`).

下面是我解决这个问题的方法:

将方案添加到项目“Runner”下的Podfile

project 'Runner', {
  'Debug' => :debug,
  'Debug-staging' => :debug,
  'Profile' => :release,
  'Profile-staging' => :release,
  'Release' => :release,
  'Release-staging' => :release,
}

进入ios/颤振/调试。Xcconfig和include

#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug-staging.xcconfig"

进入ios/Flutter/Release。Xcconfig和include

#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release-staging.xcconfig"
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile-staging.xcconfig"

颤振清洁 删除podfile.lock 酒吧得到 圆荚体安装