0

in my project i am using firebase auth for user login and also text recognition from google_ml_kit but when i run my application in ios then its giving error while installing pod file because of conflict with firebase auth package and google_ml_kit package for GTMSessionFetcher/Core version the error is following

[!] CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
In snapshot (Podfile.lock):
GTMSessionFetcher/Core (< 4.0, = 1.7.2, ~> 1.1)

firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) was resolved to 4.2.6, which depends on
  Firebase/Auth (= 10.3.0) was resolved to 10.3.0, which depends on
    FirebaseAuth (~> 10.3.0) was resolved to 10.3.0, which depends on
      GTMSessionFetcher/Core (< 4.0, >= 2.1)

google_mlkit_commons (from `.symlinks/plugins/google_mlkit_commons/ios`) was resolved to 0.2.0, which depends on
  MLKitVision was resolved to 4.2.0, which depends on
    GTMSessionFetcher/Core (~> 1.1)

please anyone can guide me how i fix this issue, i am using latest versions of firebase auth and google ml kit.

2 Answers2

0

Use Firebase 9.6.0. MLKit is not currently compatible with Firebase 10.x.

Paul Beusterien
  • 27,542
  • 6
  • 83
  • 139
  • but firebase latest version on pub dev is firebase_auth: ^4.2.8, because I'm using it on flutter, so which version I should follow on flutter – Waqas Farooq Feb 20 '23 at 10:01
0
  1. Create MLKitVision.podspec.json in ios folder taking content from this file here

  2. Create MLKitCommon.podspec.json in ios folder taking content from this file here

  3. Modify in both files the GTMSessionFetcher/Core definition from 1.1 to version 2.1.

  4. Inside your Podfile for the target 'project-name' you have to add at the end the following lines:

    pod 'MLKitVision', :podspec => 'MLKitVision.podspec.json'

    pod 'MLKitCommon', :podspec => 'MLKitCommon.podspec.json'

  5. Run pod install

  6. build the app

Eazy
  • 3,212
  • 5
  • 24
  • 40