I updated Flutter to 3.19. Then when I try to run the iphone15 simulator I get the following error. what should I do?
Error: The pod "Firebase/Firestore" required by the plugin "cloud_firestore" requires a higher minimum iOS deployment version than the plugin's reported minimum version.
To build, remove the plugin "cloud_firestore", or contact the plugin's developers for assistance.
Error running pod install
Error launching application on iPhone 15.
2
Answers
First try running these in terminal:
flutter clean
flutter pub get
cd ios
if you are not already in the ios folder of the project.pod install --repo-update
, or if on Mac M1/M2/M3 (ARM):arch -x86_64 pod install --repo-update
Those steps usually do the trick for me, when iOS gives me headaches to do with packages
Alternatives
If it doesn’t work, then you might need to downgrade flutter.
I am running fine using the iPhone 15 simulator on Flutter 3.16.9 using Firebase and Cloud Firestore.
These are the versions for the relevant packages in my pubspec.yaml:
firebase_auth: 4.6.0
cloud_firestore: 4.7.0
firebase_core: ^2.1.0
firebase_messaging: ^14.0.2
firebase_core_platform_interface: ^4.5.2
firebase_crashlytics: ^3.0.7
firebase_analytics: ^10.3.0
To fix this, as the error mentions, you need to increment the minimum iOS deployment version. To do this, go to:
ios > Podfile
and uncomment the second lineplatform :ios, 'XX.X'
and set the minimum to at least 14.0 or 15.0.If the error still occurs, go to the end of the file and modify it like this (Be careful as you might have other code already there and you need to merge it):