Closed rivella50 closed 1 year ago
Hey there :wave: - this does not contain quite enough details to help https://stackoverflow.com/help/how-to-ask
Additionally, why wouldn't you want to use current versions (that is, 10.1.0?)
You mention pubspec.yaml
so I will assume you mean FlutterFire.
I think you want to add a variable to your Podfile. that defines the version that you want and all of FlutterFire will use it:
10.1.0 should work, assuming you are on the most up to date versions of your FlutterFire dependencies
Hi Mike, thanks for answering. I tried with version 10.1.0 but get this error when calling
pod install --repo-update
Updating local specs repositories
Analyzing dependencies
Pre-downloading: `FirebaseFirestore` from `https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag `10.1.0`
FirebaseFirestore/AutodetectLeveldb: subspec would include leveldb if used directly or by default.
cloud_firestore: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
cloud_functions: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
firebase_analytics: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
firebase_app_check: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
Ignoring ffi-1.15.5 because its extensions are not built. Try: gem pristine ffi --version 1.15.5
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/dependency.rb:313:in `to_specs': Could not find 'rexml' (~> 3.2.4) - did find: [rexml-3.1.9.1] (Gem::MissingSpecVersionError)
Checked in 'GEM_PATH=/Users/valley/.gem/ruby/2.6.0:/Library/Ruby/Gems/2.6.0:/opt/homebrew/Cellar/cocoapods/1.11.3/libexec:/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0', execute `gem env` for more information
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1449:in `block in activate_dependencies'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `activate_dependencies'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1420:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:223:in `rescue in try_activate'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:216:in `try_activate'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:123:in `rescue in require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
from /Users/valley/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-3.0.4/ios/crashlytics_add_upload_symbols:1:in `<main>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/dependency.rb:313:in `to_specs': Could not find 'rexml' (~> 3.2.4) - did find: [rexml-3.1.9.1] (Gem::MissingSpecVersionError)
Checked in 'GEM_PATH=/Users/valley/.gem/ruby/2.6.0:/Library/Ruby/Gems/2.6.0:/opt/homebrew/Cellar/cocoapods/1.11.3/libexec:/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0', execute `gem env` for more information
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1449:in `block in activate_dependencies'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `activate_dependencies'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1420:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:217:in `try_activate'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:123:in `rescue in require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
from /Users/valley/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-3.0.4/ios/crashlytics_add_upload_symbols:1:in `<main>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- xcodeproj (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/valley/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-3.0.4/ios/crashlytics_add_upload_symbols:1:in `<main>'
firebase_crashlytics: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
firebase_storage: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "FirebaseFirestore":
In Podfile:
FirebaseFirestore (from `https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag `10.1.0`)
cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 4.0.4, which depends on
Firebase/Firestore (= 10.0.0) was resolved to 10.0.0, which depends on
FirebaseFirestore (~> 10.0.0)
And i've checked that i'm using the most recent Firebase package versions in my pubspec.yaml.
The Podfile is the important part, did you put:
$FirebaseSDKVersion = '10.1.0'
in your Podfile? Because right now firebase_core is still not picking it up, it's trying to use 10.0.0 leading to inevitable conflict.
I name the SDK version here in my Podfile (which worked fine for e.g. version 9.3.0):
target 'Runner' do
use_frameworks!
use_modular_headers!
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.1.0'
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
I've never seen the variable you mentioned above. Is this one required from version 10 on?
I link-quoted the code above that uses the variable and incidentally shows how it is used. It has always been available but not publicly documented as it will require you - the integrator - to bump the version manually as needed if you use it.
But that's your explicit goal, to manually ingest firebase-ios-sdk 10.1.0, so I'm showing you how to get what you want.
How did it go when you tried it?
It actually works, i.e. build and deployment run fine now with the most recent versions. So that missing variable was the crucial part. Thank you very much.
Fantastic! Glad that worked - remember to remove it later when you have the version you want, so you are not forever responsible for updating it. The release of the next version this PR will be your clue that you may safely remove it https://github.com/firebase/flutterfire/pull/9869
Does it matter if that line just stays there? I don't perform these iOS SDK version updates that often.
Yes it matters how long it stays there, it should be considered "for emergency use only" as you are now responsible for all compatibility issues between firebase-ios-sdk and flutterfire modules. I'm not sure I personally would sign up for that responsibility long term. But every project is different. But if you never update it, and you leave it there, you will eventually have a compile failure.
You will decide for yourself how long to leave it there and if that is important for your project.
Ah, so this means declaring the variable FirebaseSDKVersion explicitely was only a quickfix and will be obsolete once the mentioned PR has been merged, i.e. after that action i'm good to go with "only" using
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.1.0'
in target Runner again?
My previous comments have answered your question
I would like to update from SDK version 9.3.0 to 9.6.0, but i don't know (up to) which Firebase package versions i may enter in my pubspec.yaml in order that the ios build, deploy and run works fine. Is there an overview which SDK versions correspond to the published Firebase package version ranges?
E.g. when i tried to build with version 9.6.0 i got lots of errors since the package versions of the several Firebase plugins i entered in pubspec.yaml seem to be too new.
Sorry for the dumb question, perhaps i'm completely wrong here, then just correct me. Thank you.