Search code examples
iosxcodefirebasefluttercocoapods

Cocoapods files are missing in flutter


I'm not an ios developer and am trying to add Firebase to my Flutter project. I followed the firebase guideline of adding an ios project. I first moved the GoogleService-Info.plist into Runner/Runner in Xcode. Thereafter I executed $pod init and added pod 'Firebase Core' into the Podfile. As described in the setup guide I executed pod install thereafter. This command already shows the following error messages:

[!] Automatically assigning platform ios with version 8.0 on target Runner because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.

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

When I now try to run my app the debug concol outputs these errors:

=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
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. Run 'pod install' or update your CocoaPods installation.

It seems as if some files are missing even though they are inside the ios project folder.


Solution

  • 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.