Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency conflict with flutterfire (firebase - google_mlkit_face_detection) [GTMSessionFetcher/Core] #357

Closed
phiyale opened this issue Oct 25, 2022 · 33 comments
Labels
Firebase Issues related to using ML Kit along with Firabase

Comments

@phiyale
Copy link

phiyale commented Oct 25, 2022

Hello,
flutterfire released a major update, 4 days ago. after updating firebase libs I got the error below:

    [!] CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
      In Podfile:
        firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) was resolved to 4.0.2, which depends on
          Firebase/Auth (= 10.0.0) was resolved to 10.0.0, which depends on
            FirebaseAuth (~> 10.0.0) was resolved to 10.0.0, which depends on
              GTMSessionFetcher/Core (~> 2.1)

        google_mlkit_face_detection (from `.symlinks/plugins/google_mlkit_face_detection/ios`) was resolved to 0.4.0, which depends on
          GoogleMLKit/FaceDetection (~> 3.2.0) was resolved to 3.2.0, which depends on
            MLKitFaceDetection (~> 2.2.0) was resolved to 2.2.0, which depends on
              MLKitVision (~> 4.2) was resolved to 4.2.0, which depends on
                GTMSessionFetcher/Core (~> 1.1)

I've updated the face_detection package but error still occurs,
in pubspec.yaml

  firebase_auth: ^4.0.2
  firebase_core: ^2.1.0
  google_mlkit_face_detection:
    git:
      url: https://github.com/bharat-biradar/Google-Ml-Kit-plugin.git
      ref: f8edf95e85e74778be2b7f082b367f4a086e503f
      path: packages/google_mlkit_face_detection

flutterfire side:
firebase/flutterfire@9627c56
firebase/flutterfire#9708

flutter doctor:

[✓] Flutter (Channel stable, 3.3.5, on macOS 12.6 21G115 darwin-arm, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
[✓] Android Studio (version 2021.3)
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.72.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

Are you planning any update update to resolve conflict, or should I rollback FIR update and wait for a while?
Do you any advice to workaround?
Thanks.

@willisra
Copy link

I'm facing the same problem but for google_mlkit_text_recognition ( MLKitTextRecognitionKorean and MLKitTextRecognitionJapanese )

I guess the conflict will be solved for all the modules at once since it's a common dependency.

@phiyale
Copy link
Author

phiyale commented Oct 27, 2022

https://issuetracker.google.com/issues/254418199

@phiyale
Copy link
Author

phiyale commented Nov 1, 2022

MLKit Team(Google side):

Currently the next release is planned at the end of Q4.

https://issuetracker.google.com/issues/254418199#comment22

😔 You can Vote(I'am impacted button) which at the issue above, you can also leave a comment.

@phiyale
Copy link
Author

phiyale commented Nov 1, 2022

    The Google team has assigned the MLKit bug ticket https://issuetracker.google.com/issues/254418199 with a Priority level of P4.

P4 is the lowest priority they are working with, described as:

P4 | An issue that should be addressed eventually. Such an issue is not relevant to core organizational functions or the work of other teams, or else it relates only to the attractiveness or pleasantness of the system.

All of you who are experiencing this Google bug, could you please browse to the https://issuetracker.google.com/issues/254418199 issue, and click on the "+1" blue button on the top right to make Google aware that it is affecting people.
Thanks.

Originally posted by @MagnusJohansson in firebase/flutterfire#9805 (comment)

@ghost
Copy link

ghost commented Nov 5, 2022

@phiyale
I cannot access the IssueTracker you indicate. Why is that?

@phiyale
Copy link
Author

phiyale commented Nov 5, 2022

@motoki-osaki
They closed puclic access or removed recently, MLKIT team looks very irresponsible.

@ghost
Copy link

ghost commented Nov 5, 2022

@phiyale
Thanks. There must have been over 100 votes...going to remove them? How irresponsible the MLKIT team is.

@sibylantoninobajeli
Copy link

This is a frustrating situation!!! I cannot access anymore to https://issuetracker.google.com/issues/254418199 , and I am blocked with my App upgrade development!!
I cannot see the status and votes ( till yesterday have been more than 115 votes).

@phiyale
Copy link
Author

phiyale commented Nov 6, 2022

I am personally convinced that the mlkit team and their projects cannot be trusted. it seems very important to switch to a more reliable and fully open source alternative instead.

@dmitry-kotorov
Copy link

Latest update did not resolve the issue. And I cannot access https://issuetracker.google.com/issues/254418199 as well. Could you please kindly share ETA for the fix to be available?

@phiyale
Copy link
Author

phiyale commented Nov 7, 2022

@ghost
Copy link

ghost commented Nov 8, 2022

Now can access it. What's going on...
https://issuetracker.google.com/issues/254418199#comment22

@phiyale
Copy link
Author

phiyale commented Nov 8, 2022

@motoki-osaki ahahaha no idea. they may be ambivalent about democracy and transparency :)

@jorgeroncero
Copy link

jorgeroncero commented Nov 8, 2022

I've managed to workaround this issue until a new stable MLKitVision/MLKitCommons version is released.

I didn't test all features of MLKit but for me it's building and working for barcode scanning. I don't know if there could be any potential error since we are overriding the GTMSessionFetcher version from 1.1 to 2.1 without any code check.

The steps are:

  1. Create MLKitVision.podspec.json file in the same folder than your Podfile and copy the json content from https://github.com/CocoaPods/Specs/blob/master/Specs/8/1/e/MLKitVision/4.2.0/MLKitVision.podspec.json
  2. Create MLKitCommon.podspec.json file in the same folder than your Podfile and copy the json content from https://github.com/CocoaPods/Specs/blob/master/Specs/c/c/6/MLKitCommon/8.0.0/MLKitCommon.podspec.json
  3. Modify GTMSessionFetcher/Core version to 2.1 in both created files.
  4. Add the following lines to your Podfile under target 'Runner':
 pod 'MLKitCommon', :podspec => 'MLKitCommon.podspec.json'
 pod 'MLKitVision', :podspec => 'MLKitVision.podspec.json'
  1. Run pod install
  2. Build your app

EDIT:
You should have the latest dependency in your pubspec.yaml, which is google_mlkit_barcode_scanning: ^0.5.0

@DevarshRanpara
Copy link

Hey @jorgeroncero Thanks for this, Any idea how can I implement this in my CI/CD tool? I am using codemagic for it.

I've managed to workaround this issue until a new stable MLKitVision/MLKitCommons version is released.

I didn't test all features of MLKit but for me it's building and working for barcode scanning. I don't know if there could be any potential error since we are overriding the GTMSessionFetcher version from 1.1 to 2.1 without any code check.

The steps are:

  1. Create MLKitVision.podspec.json file in the same folder than your Podfile and copy the json content from https://github.com/CocoaPods/Specs/blob/master/Specs/8/1/e/MLKitVision/4.2.0/MLKitVision.podspec.json
  2. Create MLKitCommon.podspec.json file in the same folder than your Podfile and copy the json content from https://github.com/CocoaPods/Specs/blob/master/Specs/c/c/6/MLKitCommon/8.0.0/MLKitCommon.podspec.json
  3. Modify GTMSessionFetcher/Core version to 2.1 in both created files.
  4. Add the following lines to your Podfile under target 'Runner':
 pod 'MLKitCommon', :podspec => 'MLKitCommon.podspec.json'
 pod 'MLKitVision', :podspec => 'MLKitVision.podspec.json'
  1. Run pod install
  2. Build your app

@sibylantoninobajeli
Copy link

I'm sorry @DevarshRanpara ... I have no idea, I use Fastalane as CI/CD.

Cheers, Tony

@steven230500
Copy link

steven230500 commented Nov 11, 2022

I've managed to workaround this issue until a new stable MLKitVision/MLKitCommons version is released.

I didn't test all features of MLKit but for me it's building and working for barcode scanning. I don't know if there could be any potential error since we are overriding the GTMSessionFetcher version from 1.1 to 2.1 without any code check.

The steps are:

  1. Create MLKitVision.podspec.json file in the same folder than your Podfile and copy the json content from https://github.com/CocoaPods/Specs/blob/master/Specs/8/1/e/MLKitVision/4.2.0/MLKitVision.podspec.json
  2. Create MLKitCommon.podspec.json file in the same folder than your Podfile and copy the json content from https://github.com/CocoaPods/Specs/blob/master/Specs/c/c/6/MLKitCommon/8.0.0/MLKitCommon.podspec.json
  3. Modify GTMSessionFetcher/Core version to 2.1 in both created files.
  4. Add the following lines to your Podfile under target 'Runner':
 pod 'MLKitCommon', :podspec => 'MLKitCommon.podspec.json'
 pod 'MLKitVision', :podspec => 'MLKitVision.podspec.json'
  1. Run pod install
  2. Build your app

Hi, I put the two lines here and not worked for me:

target 'Runner' do
  pod 'MLKitCommon', :podspec => 'MLKitCommon.podspec.json'
  pod 'MLKitVision', :podspec => 'MLKitVision.podspec.json'

  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
  
end
[!] CocoaPods could not find compatible versions for pod "MLKitCommon":
  In Podfile:
    MLKitCommon (from `MLKitCommon.podspec.json`)

    MLKitVision (from `MLKitVision.podspec.json`) was resolved to 4.2.0, which depends on
      MLKitCommon (~> 8.0)

    mobile_scanner (from `.symlinks/plugins/mobile_scanner/ios`) was resolved to 0.0.1, which depends on
      GoogleMLKit/BarcodeScanning (~> 2.6.0) was resolved to 2.6.0, which depends on
        GoogleMLKit/MLKitCore (= 2.6.0) was resolved to 2.6.0, which depends on
          MLKitCommon (~> 5.0.0)

Any suggestion? thanks.

@motucraft
Copy link

I have applied the above workaround and referred to the podfile shared here. It worked for me.
Thanks to those who shared their information.
firebase/flutterfire#9761 (comment)

  firebase_core: ^2.1.1
  firebase_auth: ^4.1.1
  cloud_firestore: ^4.0.4
  cloud_firestore_odm: ^1.0.0-dev.39
  firebase_storage: ^11.0.4
  firebase_crashlytics: ^3.0.4
  firebase_messaging: ^14.0.4
  mobile_scanner: ^3.0.0-beta.1
My Podfile here
# Override Firebase SDK Version
$FirebaseSDKVersion = '10.1.0'
# Uncomment this line to define a global platform for your project
platform :ios, '15.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  # see...
  #   https://github.com/juliansteenbakker/mobile_scanner/issues/335#issuecomment-1308829103
  #   https://issuetracker.google.com/issues/254418199#comment48
  pod 'MLKitVision', :podspec => 'MLKitVision.podspec.json'
  pod 'MLKitCommon', :podspec => 'MLKitCommon.podspec.json'

  use_frameworks!
  use_modular_headers!

  # see...
  #   https://github.com/firebase/flutterfire/issues/9761#issuecomment-1301997595
  pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => $FirebaseSDKVersion

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end

@steven230500
Copy link

I have applied the above workaround and referred to the podfile shared here. It worked for me. Thanks to those who shared their information. firebase/flutterfire#9761 (comment)

  firebase_core: ^2.1.1
  firebase_auth: ^4.1.1
  cloud_firestore: ^4.0.4
  cloud_firestore_odm: ^1.0.0-dev.39
  firebase_storage: ^11.0.4
  firebase_crashlytics: ^3.0.4
  firebase_messaging: ^14.0.4
  mobile_scanner: ^3.0.0-beta.1

My Podfile here

Thanks, it worked with mobile_scanner: ^3.0.0-beta.1

@emileswain
Copy link

I can confirm it works with

PODFile -

...
$FirebaseSDKVersion = '10.1.0'
...
target 'Runner' do
  pod 'MLKitCommon', :podspec => 'MLKitCommon.podspec.json'
  pod 'MLKitVision', :podspec => 'MLKitVision.podspec.json'
  pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => $FirebaseSDKVersion

  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
...

pubspec

  cloud_firestore: ^4.0.4
  firebase_core: ^2.1.1
  flutter_riverpod: ^2.1.1
  cloud_functions: ^4.0.3
  firebase_auth: ^4.1.1
  intl: ^0.17.0
  sliver_tools: ^0.2.8
  camera: ^0.10.0+4
  path_provider: ^2.0.11
  path: ^1.8.2
  firebase_ml_model_downloader: ^0.2.0+4
  stack_trace: ^1.10.0
  google_mlkit_pose_detection: ^0.5.0

@phiyale
Copy link
Author

phiyale commented Nov 26, 2022

Workaround:
#357 (comment)
thanks @jorgeroncero
Do not forget to edit Podfile
#357 (comment)
thanks @steven230500 @emileswain

The solution above works, confirmed few people(including me), any side effect not reported yet.

MLKit team also suggesting tweaking dependencies before MLKit release new pods
https://issuetracker.google.com/issues/254418199#comment56

I'am closing the issue, after new pods released It can be implemented by contributors

@maulikchak
Copy link

same issue facing

@fbernaly
Copy link
Collaborator

@maulikchak : Solution is above: #357 (comment)

@raysonlim77
Copy link

1- Create MLKitVision.podspec.json in ios folder taking content from https://github.com/CocoaPods/Specs/blob/master/Specs/8/1/e/MLKitVision/4.2.0/MLKitVision.podspec.json
2- Create MLKitCommon.podspec.json in ios folder taking content from https://github.com/CocoaPods/Specs/blob/master/Specs/c/c/6/MLKitCommon/8.0.0/MLKitCommon.podspec.json
3- Modify in both files the GTMSessionFetcher/Core definition from 1.1 to version 2.1.
4- the target "Runner" line in your Podfile should look like:

$FirebaseSDKVersion = '10.1.0'
target 'Runner' do
pod 'MLKitCommon', :podspec => 'MLKitCommon.podspec.json'
pod 'MLKitVision', :podspec => 'MLKitVision.podspec.json'
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => $FirebaseSDKVersion
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(FILE))
end

5- Run the command below

 pod update GTMSessionFetcher/Core
 pod update Firebase/Auth
 pod install

@glintpursuit
Copy link

I've managed to workaround this issue until a new stable MLKitVision/MLKitCommons version is released.

I didn't test all features of MLKit but for me it's building and working for barcode scanning. I don't know if there could be any potential error since we are overriding the GTMSessionFetcher version from 1.1 to 2.1 without any code check.

The steps are:

  1. Create MLKitVision.podspec.json file in the same folder than your Podfile and copy the json content from https://github.com/CocoaPods/Specs/blob/master/Specs/8/1/e/MLKitVision/4.2.0/MLKitVision.podspec.json
  2. Create MLKitCommon.podspec.json file in the same folder than your Podfile and copy the json content from https://github.com/CocoaPods/Specs/blob/master/Specs/c/c/6/MLKitCommon/8.0.0/MLKitCommon.podspec.json
  3. Modify GTMSessionFetcher/Core version to 2.1 in both created files.
  4. Add the following lines to your Podfile under target 'Runner':
 pod 'MLKitCommon', :podspec => 'MLKitCommon.podspec.json'
 pod 'MLKitVision', :podspec => 'MLKitVision.podspec.json'
  1. Run pod install
  2. Build your app

EDIT: You should have the latest dependency in your pubspec.yaml, which is google_mlkit_barcode_scanning: ^0.5.0

@jorgeroncero

After implementing above hack able to get pod installed but unable get app build for IOS

`Could not build the precompiled application for the device.
Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'GTMAppAuth.GTMAppAuthFetcherAuthorization': 'ios/Pods/Headers/Public/GTMSessionFetcher/GTMSessionFetcher.h'
ios/Pods/GTMAppAuth/GTMAppAuth/Sources/Public/GTMAppAuth/GTMAppAuthFetcherAuthorization.h:21:10

Parse Issue (Xcode): Could not build module 'GTMAppAuth'
ios/Pods/GoogleSignIn/GoogleSignIn/Sources/Public/GoogleSignIn/GIDAuthentication.h:23:8

Parse Issue (Xcode): Could not build module 'GoogleSignIn'
/Users/yyy/.pub-cache/hosted/pub.dartlang.org/google_sign_in_ios-5.5.1/ios/Classes/FLTGoogleSignInPlugin.m:7:8`

@jorgeroncero
Copy link

@glintpursuit can you show your Podfile?

Also, try to do a full clean pod install.

  1. flutter clean
  2. delete /ios/Pods folder
  3. delete /ios/Podfile.lock file
  4. flutter pub get
  5. cd ios && pod install
  6. flutter run

@glintpursuit
Copy link

glintpursuit commented Jan 26, 2023

Thanks for quick response @jorgeroncero

It was my bad, I didn't added below 2 lines inside target runner do after adding it inside & before below line, I am able to get it running.

pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.3.0'

POD File

target 'Runner' do

  pod 'MLKitCommon', :podspec => 'MLKitCommon.podspec.json'
  pod 'MLKitVision', :podspec => 'MLKitVision.podspec.json'
  pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.3.0'

  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

@iLoveDocs
Copy link

@jorgeroncero Sorry, it's still not working. What I did:

1. Copied those two files in ios folder

image

2. Changed the version to 2.1 in MLKitVision.podspec.json

image

3. Changed the version to 2.1 in MLKitCommon.podspec.json

image

4. Running command:

flutter clean
flutter pub get
cd ios 
pod install 

Error:

[!] CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
In Podfile:
MLKitVision (from MLKitVision.podspec.json) was resolved to 4.2.0, which depends on
GTMSessionFetcher/Core (~> 2.1)

firebase_storage (from .symlinks/plugins/firebase_storage/ios) was resolved to 11.0.10, which depends on
Firebase/Storage (= 10.3.0) was resolved to 10.3.0, which depends on
FirebaseStorage (~> 10.3.0) was resolved to 10.3.0, which depends on
GTMSessionFetcher/Core (< 4.0, >= 2.1)

google_sign_in_ios (from .symlinks/plugins/google_sign_in_ios/ios) was resolved to 0.0.1, which depends on
GoogleSignIn (~> 6.2) was resolved to 6.2.4, which depends on
GTMSessionFetcher/Core (< 3.0, >= 1.1)

Podfile
# Uncomment this line to define a global platform for your project
platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks!
  use_modular_headers!

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

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
  pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.3.0'
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end

Can anyone be kind enough to tell me what am I doing wrong. I'll really be grateful to you. Thank in advance :)

@raysonlim77
Copy link

@jorgeroncero Sorry, it's still not working. What I did:

1. Copied those two files in ios folder

image

2. Changed the version to 2.1 in MLKitVision.podspec.json

image

3. Changed the version to 2.1 in MLKitCommon.podspec.json

image

4. Running command:

flutter clean
flutter pub get
cd ios 
pod install 

Error:

[!] CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
In Podfile:
MLKitVision (from MLKitVision.podspec.json) was resolved to 4.2.0, which depends on
GTMSessionFetcher/Core (~> 2.1)

firebase_storage (from .symlinks/plugins/firebase_storage/ios) was resolved to 11.0.10, which depends on
Firebase/Storage (= 10.3.0) was resolved to 10.3.0, which depends on
FirebaseStorage (~> 10.3.0) was resolved to 10.3.0, which depends on
GTMSessionFetcher/Core (< 4.0, >= 2.1)

google_sign_in_ios (from .symlinks/plugins/google_sign_in_ios/ios) was resolved to 0.0.1, which depends on
GoogleSignIn (~> 6.2) was resolved to 6.2.4, which depends on
GTMSessionFetcher/Core (< 3.0, >= 1.1)

Podfile
Can anyone be kind enough to tell me what am I doing wrong. I'll really be grateful to you. Thank in advance :)

4- the target "Runner" line in your Podfile should look like:

$FirebaseSDKVersion = '10.1.0'
target 'Runner' do
pod 'MLKitCommon', :podspec => 'MLKitCommon.podspec.json'
pod 'MLKitVision', :podspec => 'MLKitVision.podspec.json'
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => $FirebaseSDKVersion
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(FILE))
end

@iLoveDocs
Copy link

@raysonlim77 Thanks, I changed that but it still didn't work.

image

@raysonlim77
Copy link

@raysonlim77 Thanks, I changed that but it still didn't work.

image

this method doesn't work for mlkit_language

@iLoveDocs
Copy link

But why I'm getting the error in this line?

MLKitVision (from MLKitVision.podspec.json) was resolved to 4.2.0, which depends on
GTMSessionFetcher/Core (~> 2.1)

I think I am doing something wrong and I have no idea what that is.

@iLoveDocs
Copy link

iLoveDocs commented Feb 20, 2023

Finally, I was able to solve it, thanks to @raysonlim77 for giving me hints.

With all the steps mentioned above, I also had to make one more change and that is in my
/Users/username/.cocoapods/repos/trunk/Specs/0/d/7/MLKitNaturalLanguage/4.2.0/MLKitNaturalLanguage.podspec.json file, I changed GTMSessionFetcher/Core from 1.1 to 2.1.

OR

You can download MLKitNaturalLanguage.podspec.json in your ios directory, change the GTMSessionFetcher/Core from 1.1 to 2.1 and add it to your podfile:


$FirebaseSDKVersion = '10.3.0'
target 'Runner' do
  pod 'MLKitCommon', :podspec => 'MLKitCommon.podspec.json'
  pod 'MLKitVision', :podspec => 'MLKitVision.podspec.json'
  pod 'MLKitNaturalLanguage', :podspec => 'MLKitNaturalLanguage.podspec.json'
  pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => $FirebaseSDKVersion

  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Firebase Issues related to using ML Kit along with Firabase
Projects
None yet
Development

No branches or pull requests