How to fix Could not build the application for the simulator.
Error launching application on iPhone 11, 12, 13, 14, 15, 16 when using firebase.
There are a lot of reasons why this error shows up. It can be Podfile, Podfile.lock, or deployment version incompatible with the firebase version. We have been frustrated there many times, and here are some ways to fix it. Enjoy!
Here are some of the example error:
The iOS Simulator deployment target ‘IPHONEOS_DEPLOYMENT_TARGET’ is set to 8.0, but the range of supported
deployment target versions is 9.0 to 15.2.99. (in target ‘leveldb-library’ from project ‘Pods’)
Specs satisfying the `cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)` dependency were found, but they required a higher minimum deployment target.
[!] 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`).
Go into the ios folder and update PodSpecs
cd ios && pod repo update
Go into the ios folder and delete Podfile.lock
cd ios && rm Podfile.lock
Clean the build cache. This will takes a little more time to build/run later.
Delete Podfile and Podfile.lock so it will rebuild again
cd ios && rm Podfile && rm Podfile.lock
Get all the packages or upgrade your package
flutter pub get or flutter pub upgrade
If there are still errors you can try opening Xcode, wait for the indexing to complete, click on the Update to recommended settings and Perform Changes.
Drop me some claps and follow me if this article helps you, it motivates me to create more! Thank you, everyone! 👏👏👏👏👏