Hello Guys How are you all? Hope You all are fine. When I was trying to run my flutter app and suddenly I get the following error in my stack track. CocoaPods could not find compatible versions for pod “Firebase/CoreOnly” in flutter. So today Here I come with all possible solutions for this error.
We are providing you all possible solutions to solve this error. let’s start this article without wasting your time.
How CocoaPods could not find compatible versions for pod “Firebase/CoreOnly” Error Occurs ?
I’ve update my flutter package to the last versions and now IOS doesn’t work anymore. So I have found one solution that I have to update my pods. When I try to update the pods it’s shows this error:
[!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
In Podfile:
cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 0.0.1, which depends on
Firebase/Firestore (~> 6.0) was resolved to 6.0.0, which depends on
Firebase/CoreOnly (= 6.0.0)
How to Solve CocoaPods could not find compatible versions for pod “Firebase/CoreOnly” Error?
- How to Solve CocoaPods could not find compatible versions for pod “Firebase/CoreOnly” Error?
To solve CocoaPods could not find compatible versions for pod “Firebase/CoreOnly” Error Just follow all steps given. cd ios delete the Podfile.lock in the root directory rm -rf Podfile.lock after that run pod install Now your error must be solved.
- CocoaPods could not find compatible versions for pod “Firebase/CoreOnly”
To solve CocoaPods could not find compatible versions for pod “Firebase/CoreOnly” Error Just follow all steps given. cd ios delete the Podfile.lock in the root directory rm -rf Podfile.lock after that run pod install Now your error must be solved.
Solution 1 : pod install
Before update pod you have to delete Podfile.lock and then you can update pods. Just follow all steps given below.
- cd ios
- delete the Podfile.lock in the root directory
- rm -rf Podfile.lock
- after that run
pod install
- Now your error must be solved.
this worked for me as well
Solution 2 : Change minimum ios version
- Execute
flutter clean
- Go to
ios/
folder, editPodfile
and choose the platorm and version you want to launch. For example for platform ios and version 12.0 :
In Podfile
# Uncomment this line to define a global platform for your project
platform :ios, '10.0'
- Execute
pod update
- Execute
pod install
(it can take a some minutes to download dependencies) - Then Just Execute
flutter run
Solution 3
In AppDelegate.swift (flutter-project/ios/Runner), add these 2 lines:
FirebaseApp.configure()
GeneratedPluginRegistrant.register(with: self)
In Terminal:
pod repo update
flutter build ios
Then run your project in Xcode.
Summery
So, It’s All About This Error. I hope this tutorial helps you solve your error. Please Comment Below if You stucks anywhere with my code.
Also Check Out Below Tutorials
- Flutter Firestore causing D8: Cannot fit requested classes in a single dex file (# methods: 71610 > 65536)
- Flutter Error: MediaQuery.of() called with a context that does not contain a MediaQuery
- Flutter: RenderBox was not laid out
- type ‘List‘ is not a subtype of type ‘List‘ in Flutter
- Flutter and google_sign_in plugin: PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null)
Leave a Reply