Ad

Flutter Pod Install Error With Firebase Messaging On Ios

- 1 answer

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:

  • out-of-date source repos which you can update with pod repo update or with pod install --repo-update.
  • mistyped the name or version.
  • not added the source repo that hosts the Podspec to your Podfile.

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!

  • pod install --repo-update this donst help;
  • also cocoa pods installation in M1 dosnt resolve this problem;
Ad

Answer

Problem was resolved using this command

flutter pub cache repair 

Thank you for all!

Ad
source: stackoverflow.com
Ad