1

I have a flutter project that use a firebase auth for login and registration, and i want to add google_mlkit_face_detection to detect face on an image, but the google_mlkit_face_detection and firebase_auth conflict each other for IOS, when runing pod install show me this error.

Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.

To update the CocoaPods specs, run: pod repo update

this is the hole error

CocoaPods' output: ↳ Preparing Analyzing dependencies Inspecting targets to integrate Using ARCHS setting to build architectures of target Pods-Runner: (``) Finding Podfile changes A google_mlkit_commons A google_mlkit_face_detection - Flutter - firebase_auth - firebase_core - image_picker_ios - path_provider_foundation Fetching external sources -> Fetching podspec for Flutter from Flutter -> Fetching podspec for firebase_auth from .symlinks/plugins/firebase_auth/ios firebase_auth: Using Firebase SDK version '10.9.0' defined in 'firebase_core' -> Fetching podspec for firebase_core from .symlinks/plugins/firebase_core/ios firebase_core: Using Firebase SDK version '10.9.0' defined in 'firebase_core' -> Fetching podspec for google_mlkit_commons from .symlinks/plugins/google_mlkit_commons/ios -> Fetching podspec for google_mlkit_face_detection from .symlinks/plugins/google_mlkit_face_detection/ios -> Fetching podspec for image_picker_ios from .symlinks/plugins/image_picker_ios/ios -> Fetching podspec for path_provider_foundation from .symlinks/plugins/path_provider_foundation/darwinResolving dependencies of Podfile CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update CDN: trunk Relative path: all_pods_versions_0_3_5.txt exists! Returning local because checking is only performed in repo update CDN: trunk Relative path: Specs/0/3/5/Firebase/10.10.0/Firebase.podspec.json exists! Returning local because checking is only performed in repo update CDN: trunk Relative path: Specs/0/3/5/Firebase/10.9.0/Firebase.podspec.json exists! Returning local because checking is only performed in repo update CDN: trunk Relative path: all_pods_versions_8_1_e.txt exists! Returning local because checking is only performed in repo update CDN: trunk Relative path: Specs/8/1/e/MLKitVision/5.0.0/MLKitVision.podspec.json exists! Returning local because checking is only performed in repo update CDN: trunk Relative path: all_pods_versions_4_2_c.txt exists! Returning local because checking is only performed in repo update CDN: trunk Relative path: Specs/4/2/c/FlutterMacOS/3.0.0/FlutterMacOS.podspec.json exists! Returning local because checking is only performed in repo update CDN: trunk Relative path: Specs/0/3/5/Firebase/10.9.0/Firebase.podspec.json exists! Returning local because checking is only performed in repo update CDN: trunk Relative path: all_pods_versions_b_e_b.txt exists! Returning local because checking is only performed in repo update 2 CDN: trunk Relative path: Specs/b/e/b/GoogleMLKit/4.0.0/GoogleMLKit.podspec.json exists! Returning local because checking is only performed in repo update CDN: trunk Relative path: all_pods_versions_6_3_6.txt exists! Returning local because checking is only performed in repo update CDN: trunk Relative path: Specs/6/3/6/FirebaseAuth/10.10.0/FirebaseAuth.podspec.json exists! Returning local because checking is only performed in repo update

 [!] CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
  In snapshot (Podfile.lock):
    GTMSessionFetcher/Core (< 4.0, = 3.1.1, >= 2.1)
  In Podfile:
    firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) was resolved to 4.6.1, which depends on
      Firebase/Auth (= 10.9.0) was resolved to 10.9.0, which depends on
        FirebaseAuth (~> 10.9.0) was resolved to 10.9.0, which depends on
          GTMSessionFetcher/Core (< 4.0, >= 2.1)
    google_mlkit_face_detection (from `.symlinks/plugins/google_mlkit_face_detection/ios`) was resolved to 0.7.0, which depends on
      GoogleMLKit/FaceDetection (~> 4.0.0) was resolved to 4.0.0, which depends on
        GoogleMLKit/MLKitCore (= 4.0.0) was resolved to 4.0.0, which depends on
          MLKitCommon (~> 9.0.0) was resolved to 9.0.0, which depends on
            GTMSessionFetcher/Core (< 3.0, >= 1.1)
You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * changed the constraints of dependency `GTMSessionFetcher/Core` inside your development pod `google_mlkit_face_detection`.
   You should run `pod update GTMSessionFetcher/Core` to apply changes you've made.

and pubspec.yamel file

dependencies:

flutter:
    sdk: flutter


  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2

  firebase_core: any
  firebase_auth: any
  #google_mlkit_commons: ^0.4.0
  google_mlkit_face_detection: any
  

  get: ^4.6.5
  get_storage: ^2.1.1
  dio: ^5.1.2

  image_picker: ^0.8.7

  iconly: ^1.0.1
  intl: ^0.18.1
  age_calculator: ^1.0.0

1 Answer 1

0

Do pod deintegrate; pod update

FirebaseAuth and MLKit are compatible. < 4.0, >= 2.1 is compatible with < 3.0, >= 1.1 if a 2.x version of GTMSessionFetcher is installed.

The problem is that 3.1.1 is already installed. It needs to be deleted and then the pods reinstalled.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.