Cocoapods Warning - Cocoapods Did Not Set the Base Configuration of Your Project Because Because Your Project Already Has a Custom Config Set

Cocoapods Warning - CocoaPods did not set the base configuration of your project because because your project already has a custom config set

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.

The configuration file setting is found by selecting the project (not the target) and then the Info tab.

Flutter error: CocoaPods not installed or not in valid state.

The bug is fixed in Bumblebee 2021.1.1 Patch #1 (released 2022 February 9).

Cocoapods files are missing in flutter

After some research, I found out that it's not necessary to run these pod comments. It's only required to move the google-services file into the iOS project.

Using Cocoapods libraries in Flutter iOS platform specific code

After you run pod init and pod install in the ios/ folder, add

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

to ios/Flutter/Debug.xcconfig

and add

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

to ios/Flutter/Release.xcconfig

How to add custom project configurations to Xcode when using CocoaPods?

OK, so half-way through writing this question I figured it out myself (yay rubber ducking). Here's the solution for next generations:

Essentially, you have to add an explicit dependency on the Pods target to your application scheme.

The way you do it, is: edit your application scheme, go to the Build section, and add the Pods target above your application target. You should see something like this:

Sample Image

And it will just work.


As for the CocoaPods warnings on pod install, you need to use the xcconfig files generated by CP for each of your Xcode configurations. The way you do it is:

  • find the .xcconfig files in Pods/Target Support Files
  • drag and drop them to "Pods" group in your Xcode project (add reference only. Don't copy to target or add to the build)
  • Click on the project in project navigator, and select the project itself (not one of targets). Go to Info, and under Configurations set the right .xcconfigs to each configuration and target in the "Based on Configuration file" column.

You'll also need something like this in your Podfile to let CocoaPods know which of your Xcode configurations are "debug" (unoptimized), which are "release":

project '1Nozbe', {
'iOS 1 Dev Debug' => :debug,
'iOS 2 Dev AdHoc' => :release,
'iOS 3 Release Debug' => :debug,
'iOS 4 Release AdHoc' => :release,
'iOS 5 Release AppStore' => :release,
}

Not exactly related to CocoaPods, but if you happen to have some other (sub-project) dependencies other than CP, you'll also need to do two things:

  • add explicit dependencies on the sub-project target (like on the screenshot above)
  • rename/add configurations in your sub-project so that they are the same as your main project. (Otherwise, Xcode just doesn't know which configuration to use with your sub-project)


Related Topics



Leave a reply



Submit