mobile_scanner
mobile_scanner copied to clipboard
iOS: version conflict with Firebase libs
The current version of this lib is conflicted with the latest version of Firebase libs, here's log:
[!] CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
In Podfile:
firebase_storage (from `.symlinks/plugins/firebase_storage/ios`) was resolved to 11.0.1, which depends on
Firebase/Storage (= 10.0.0) was resolved to 10.0.0, which depends on
FirebaseStorage (~> 10.0.0) was resolved to 10.0.0, which depends on
GTMSessionFetcher/Core (~> 2.1)
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
MLKitBarcodeScanning (~> 1.7.0) was resolved to 1.7.0, which depends on
MLKitVision (~> 3.0) was resolved to 3.0.0, which depends on
GTMSessionFetcher/Core (~> 1.1)
pod repo update
pod update GTMSessionFetcher/Core
solved it for me. However, the problem for me was firebase_auth not firebase_storage.
pod repo update pod update GTMSessionFetcher/Coresolved it for me. However, the problem for me was firebase_auth not firebase_storage.
If this does not work try:
rm -rf ios/Pods
rm ios/Pdofile.lock
flutter clean
pod repo update
Then try again.
This did not work for me, sadly so is a PR to update the package spec better?
From the pod output, the issue appears to be with the Podspec for MLKitVision. Even the latest version (4.2.0) is still locked to GTMSessionFetcher/Core 1.1. Since the ML Kit SDK appears to be closed source, I amended the open ticket in Google's issue tracker: https://issuetracker.google.com/issues/254418199
Nice catch @bgetsug !
Is there any workaround on this? I try both oerni74 & peukerjonathan solution, still no luck
Same issue here, tried @oerni74 and @peukerjonathan solutions but no luck.
- 1
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.
https://issuetracker.google.com/issues/254418199#comment22
Currently the next release is planned at the end of Q4.
Will we have to wait a few months for this issue...
Same issue here, any solution?
+1 Same here ...
I roll-backed firebase_storage version, and it worked around
- firebase_storage: ^11.0.3
- firebase_storage: ^10.3.7
I'm almost done with a new update of this package which will introduce some new functions and update the dependencies as well. With these new dependencies, i did not encounter this error.
I'm almost done with a new update of this package which will introduce some new functions and update the dependencies as well. With these new dependencies, i did not encounter this error.
Thank you for the efffort! We are looking forward to the update
From the
podoutput, the issue appears to be with thePodspecforMLKitVision. Even the latest version (4.2.0) is still locked toGTMSessionFetcher/Core1.1. Since the ML Kit SDK appears to be closed source, I amended the open ticket in Google's issue tracker: https://issuetracker.google.com/issues/254418199
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.
@bgetsug @MagnusJohansson I cannot access the IssueTracker. Why is that?
I don't know why, but Issue Tracker is now accessible.
Helle guys, I would share with you a possible solution:
-
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
-
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
-
Modify in both files the GTMSessionFetcher/Core definition from 1.1 to version 2.1.
-
Inside your Podfile you have to search for "target 'Runner'" and inside it you have to add the following lines:
pod 'MLKitVision', :podspec => 'MLKitVision.podspec.json'
pod 'MLKitCommon', :podspec => 'MLKitCommon.podspec.json'
-
Run pod install
-
build the app
That solved my issue.
I hope the same to you.
I'm facing a similar problem, but between MobileScanner and GoogleMLKitTextRecognition.
[!] CocoaPods could not find compatible versions for pod "GoogleMLKit/MLKitCore":
In Podfile:
google_mlkit_text_recognition (from `.symlinks/plugins/google_mlkit_text_recognition/ios`) was resolved to 0.5.0, which depends on
GoogleMLKit/TextRecognition (~> 3.2.0) was resolved to 3.2.0, which depends on
GoogleMLKit/MLKitCore (= 3.2.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)
@juliansteenbakker thank you for your effort, does the new version ready or its still in progress?
It's still in progress. I'm hoping i can release a new beta version this weekend. You can track the progress in #362
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_core: ^2.2.0
firebase_auth: ^4.1.2
cloud_firestore: ^4.0.5
cloud_firestore_odm: ^1.0.0-dev.40
firebase_storage: ^11.0.5
firebase_crashlytics: ^3.0.5
firebase_messaging: ^14.1.0
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
I#ve done the same but got this error then with Firebase 10.2.0:
[!] 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)
// edit: works with 3.0.0.beta-1, but this version is a little bit buggy (white square on the topleft when starting the scanner)
Hi all, it took a little longer than i wanted but ive published v3.0.0-beta.2 with lots of improvements. Please checkout the changelog for all changes. I myself did not encounter any firebase issues with this version.
Besides updating the latest beta version, i've also fixed the current stable version with v2.1.0.
This version updates firebase on iOS to the latest version which fixes this issue.
Thanks for releasing v3.0.0-beta.2. I have worked with the following versions without problems.
firebase_core: ^2.3.0
firebase_auth: ^4.1.3
cloud_firestore: ^4.1.0
cloud_firestore_odm: ^1.0.0-dev.41
firebase_storage: ^11.0.6
firebase_crashlytics: ^3.0.6
firebase_messaging: ^14.1.1
google_sign_in: ^5.4.2
mobile_scanner: ^3.0.0-beta.2
My Podfile (Firebase 10.2.0)
# Override Firebase SDK Version
$FirebaseSDKVersion = '10.2.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
However, removing this workaround will result in an error.
# 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'
[!] CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
In Podfile:
firebase_storage (from `.symlinks/plugins/firebase_storage/ios`) was resolved to 11.0.6, which depends on
Firebase/Storage (= 10.2.0) was resolved to 10.2.0, which depends on
FirebaseStorage (~> 10.2.0) was resolved to 10.2.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)
mobile_scanner (from `.symlinks/plugins/mobile_scanner/ios`) was resolved to 3.0.0, which depends on
GoogleMLKit/BarcodeScanning (~> 3.2.0) was resolved to 3.2.0, which depends on
MLKitBarcodeScanning (~> 2.2.0) was resolved to 2.2.0, which depends on
MLKitCommon (~> 8.0) was resolved to 8.0.0, which depends on
GTMSessionFetcher/Core (~> 1.1)
I hope this helps.
Well in that case it really is a problem with firebase rather than this plugin.
Ultimately, I recognize that this is the fundamental problem. https://issuetracker.google.com/issues/254418199
Ultimately, I recognize that this is the fundamental problem. https://issuetracker.google.com/issues/254418199
have you found any solution?
@steven230500 Workaround. https://github.com/juliansteenbakker/mobile_scanner/issues/335#issuecomment-1314796725