在我的项目的基础上执行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。


当前回答

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

其他回答

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

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

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

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

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

别瞎捣鼓了,重置。

循序渐进的

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


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

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.