iosfluttercocoapods

Flutter pod install error with firebase messaging on ios


Command "pod install" can't be executed when run on ios flutter app folder.

Error as the following:

Analyzing dependencies firebase_core: Using Firebase SDK version '10.0.6' defined in 'firebase_core' firebase_messaging: Using Firebase SDK version '10.0.6' defined in 'firebase_core'

[!] CocoaPods could not find compatible versions for pod "Firebase/Messaging": In Podfile: firebase_messaging (from .symlinks/plugins/firebase_messaging/ios) was resolved to 10.0.6, which depends on Firebase/Messaging (= 10.0.6)

None of your spec sources contain a spec satisfying the dependency: Firebase/Messaging (= 10.0.6).

You have either:

We have this package on pubspec.yaml

firebase_core: ^1.6.0
firebase_messaging: ^10.0.6

on podfile:

platform :ios, '10.0'

We use pod version:

1.11.0.rc.1

macOS Big Sur version:

11.2.1

If we delete this packages from pubspec.yaml, pod install work fine.

We tried many ways to no avail!


Solution

  • Problem was resolved using this command

    flutter pub cache repair 
    

    Thank you for all!