Flutter CocoaPods could not find compatible versions for pod "FirebaseCore"

3,902

Please Try this steps :

if you have intel chip

  1. flutter clean
  2. update all dependencies to the latest version in pubspec.yml file and do 'get pub'
  3. Go to your Podfile and uncomment #platform :ios, '9.0' Then change the version to 10 platform :ios, '10.0'
  4. go to ios folder throuh terminal and do 'pod repo update'
  5. 'pod update' or 'pod install'

if you have M1 chip

  1. flutter clean
  2. update all dependencies to the latest version in pubspec.yml file and do 'get pub'
  3. Go to your Podfile and uncomment #platform :ios, '9.0' Then change the version to 10 platform :ios, '10.0'
  4. go to ios folder throuh terminal and do 'arch -x86_64 pod repo update'
  5. 'arch -x86_64 pod update' or 'arch -x86_64 pod install'
Share:
3,902
Sam
Author by

Sam

Updated on January 01, 2023

Comments

  • Sam
    Sam over 1 year

    I am trying to build an IOS flutter project but it is keep complaining about the compatible versions for pod. I have already tried many threads since last two days but not able to resolve the issue. However my Android version is working fine.

    I tried to delete podfile.lock, podfile, pod folder, Runner.xcworkspace also but nothing works. Now I am not having the podfile.lock file anymore. I mean the podfile.lock is not getting created.

    I am on macOS Big Sur version 11.6.

    MacBook Pro 2019

    Processor: 2.3 GHz 8-Core intel Core i9

    in my Podfile:

           platform :ios, '10.0'
    

    I also tried the following commands:

       sudo arch -x86_64 gem install ffi
    
       arch -x86_64 pod install
    

    When I run the pod install command I am getting the following error.

            Analyzing dependencies
            cloud_firestore: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
            cloud_functions: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
            firebase_analytics: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
            firebase_auth: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
            firebase_core: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
            firebase_crashlytics: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
            firebase_database: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
            firebase_in_app_messaging: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
            firebase_messaging: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
            firebase_storage: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
            [!] CocoaPods could not find compatible versions for pod "FirebaseCore":
            In Podfile:
                firebase_core (from `.symlinks/plugins/firebase_core/ios`) was resolved to 0.7.0, which depends on
                Firebase/CoreOnly (= 7.3.0) was resolved to 7.3.0, which depends on
                    FirebaseCore (= 7.3.0)
    
                firebase_database (from `.symlinks/plugins/firebase_database/ios`) was resolved to 6.0.0, which depends on
                Firebase/Database (= 7.3.0) was resolved to 7.3.0, which depends on
                    FirebaseDatabase (~> 7.3.0) was resolved to 7.3.0, which depends on
                    FirebaseCore (~> 7.0)
    
                google_ml_kit (from `.symlinks/plugins/google_ml_kit/ios`) was resolved to 0.6.0, which depends on
                GoogleMLKit/LinkFirebase (~> 2.2.0) was resolved to 2.2.0, which depends on
                    MLKitLinkFirebase (~> 1.3.0) was resolved to 1.3.0, which depends on
                    FirebaseCore (~> 8.0)
    
            CocoaPods could not find compatible versions for pod "GoogleAppMeasurement":
            In Podfile:
                firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`) was resolved to 7.0.1, which depends on
                Firebase/Analytics (= 7.3.0) was resolved to 7.3.0, which depends on
                    Firebase/Core (= 7.3.0) was resolved to 7.3.0, which depends on
                    FirebaseAnalytics (= 7.3.0) was resolved to 7.3.0, which depends on
                        GoogleAppMeasurement (= 7.3.0)
    
                google_mobile_ads (from `.symlinks/plugins/google_mobile_ads/ios`) was resolved to 0.0.1, which depends on
                Google-Mobile-Ads-SDK (= 8.5.0) was resolved to 8.5.0, which depends on
                    GoogleAppMeasurement (< 9.0, >= 7.0)
    
            CocoaPods could not find compatible versions for pod "MLKitCommon":
            In Podfile:
                google_ml_kit (from `.symlinks/plugins/google_ml_kit/ios`) was resolved to 0.6.0, which depends on
                GoogleMLKit/BarcodeScanning (~> 2.2.0) was resolved to 2.2.0, which depends on
                    GoogleMLKit/MLKitCore (= 2.2.0) was resolved to 2.2.0, which depends on
                    MLKitCommon (~> 3.0.0)
    
                google_ml_kit (from `.symlinks/plugins/google_ml_kit/ios`) was resolved to 0.6.0, which depends on
                GoogleMLKit/BarcodeScanning (~> 2.2.0) was resolved to 2.2.0, which depends on
                    MLKitBarcodeScanning (~> 1.3.0) was resolved to 1.3.0, which depends on
                    MLKitCommon (~> 3.0)
    
                google_ml_kit (from `.symlinks/plugins/google_ml_kit/ios`) was resolved to 0.6.0, which depends on
                GoogleMLKit/PoseDetectionAccurate (~> 2.2.0) was resolved to 2.2.0, which depends on
                    MLKitPoseDetectionAccurate (~> 1.0.0-beta4) was resolved to 1.0.0-beta5, which depends on
                    MLKitCommon (~> 3.1)
    
            CocoaPods could not find compatible versions for pod "MLKitXenoCommon":
            In Podfile:
                google_ml_kit (from `.symlinks/plugins/google_ml_kit/ios`) was resolved to 0.6.0, which depends on
                GoogleMLKit/PoseDetection (~> 2.2.0) was resolved to 2.2.0, which depends on
                    MLKitPoseDetection (~> 1.0.0-beta4) was resolved to 1.0.0-beta5, which depends on
                    MLKitXenoCommon (= 1.0.0-beta5)
    
                google_ml_kit (from `.symlinks/plugins/google_ml_kit/ios`) was resolved to 0.6.0, which depends on
                GoogleMLKit/PoseDetectionAccurate (~> 2.2.0) was resolved to 2.2.0, which depends on
                    MLKitPoseDetectionAccurate (~> 1.0.0-beta4) was resolved to 1.0.0-beta4, which depends on
                    MLKitXenoCommon (= 1.0.0-beta4)
    

    I tried this thread too, but did not work for me...

    Any help will be appreciated...

  • Sam
    Sam over 2 years
    I just identified that my Macbook Pro is running on Intel chip. I tried the first option but it is still giving the same error when I run 'por update' or 'pod install'. My pubspec.yaml has version: 1.0.0+1 and sdk: ">=2.7.0 < 3.0.0"
  • Tushar Moradiya
    Tushar Moradiya over 2 years
    @Sam I'm not talking about pubspec.yaml version. I'm talking about all the libraries version like firebase_core, google_ml_kit etc. Please Update latest version and do the steps.
  • Sam
    Sam over 2 years
    Thanks Tushar for your reply. Actually when I do "dart pub outdated" it shows me what is the upgradable version for my app (not the latest). I am on the upgradable version itself but yes not on the latest version.
  • Sam
    Sam over 2 years
    Thanks, after updating all my dependencies to the latest the problem is gone... thanks