Search code examples
iosflutter

CocoaPods did not set base configuration due to custom config in Flutter iOS project


I'm encountering the following issue when trying to integrate CocoaPods into my Flutter iOS project:

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

Steps taken:

  1. Run flutter clean and re-run the project.
  2. Deleted Podfile.lock and Pods/ folder, then executed pod install.
  3. Tried adjusting the configurations manually in Flutter/Debug.xcconfig and Flutter/Release.xcconfig but it didn't resolve the issue.

How can I resolve the issue where CocoaPods fails to set the base configuration because of custom configurations in my Flutter iOS project? I've tried adjusting the configurations but still receive the same warning.


Solution

  • I was having this issue as well, I found the answer here:

    https://stackoverflow.com/a/27039447/23618150

    (I develop in VSCode, the terminal inside of it is where all my commands will be ran from.)

    1. Go to the IOS directory and open the xcworkspace in Xcode

      cd IOS

      open runner.xcworkspace

    2. Once inside Xcode, make sure you have runner selected Xcode location

    1. Make sure you have the Project Runner selected
    2. Under the Info, find Configurations.
    3. Set all configurations to none, this includes Debug, Release, Profile.
    4. Close Xcode and return to vscode.
    5. I just ran pod install and it reinstalled the pods and it did not give me the warnings again. Though when I go back into Xcode and look at the configs, it automatically put them back, but I believe it is supposed to.