Need FirebaseFirestoreBinary after adding firestore-ios-sdk-frameworks?
wyxcoder opened this issue · 12 comments
After I added the below line to Podfile
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.20.0'
I got error
[!] Unable to find a specification for FirebaseFirestoreBinary (= 9.20.1)
depended upon by FirebaseFirestore
Any suggestion how to solve this?
Thanks
"Hi there! I'm using [react-native|FlutterFire] version [your version here] on macOS [my macOS version] with cocoapods [your cocoapods version] and when I include this using:
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.20.0'
...it doesn't work, it gives me:
[!] Unable to find a specification for FirebaseFirestoreBinary (= 9.20.1) depended upon by FirebaseFirestore
I've done pod deintegrate && pod update && pod install
to make sure my specs are up to date, and when I re-ran it, it [worked|stayed the same|gave me some new error]
My Podfile looks like this:
your whole Podfile here
@mikehardy
I'm using flutterfire 0.2.7 and the Firebase CLI version 12.4.7 on macOS 12.6.1 with cocoapods 1.15.2 and when I include this using:
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.21.0'
...it doesn't work, it gives me:
[!] CocoaPods could not find compatible versions for pod "FirebaseFirestoreBinary":
In Podfile:
FirebaseFirestore (from `https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag `10.21.0`) was resolved to 10.21.0, which depends on
FirebaseFirestoreBinary (= 10.21.0)
I've done flutterfire configure
to make sure the config is up to date. I also ran pod deintegrate && pod update && pod install
to make sure my specs are up to date, but it threw the same error again during pod update
.
My Podfile looks like this:
# 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!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.21.0'
I could be wrong but it is my understanding you need xcode 15 at least to build current firebase, and that transitively implies at least macos 13?
Well I can build fine if I just comment out the last line of my podfile, which is
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.21.0'
(as posted above).
These are the versions that are selected when I run pod update
, if I comment it out:
cloud_firestore: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
cloud_functions: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
firebase_analytics: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
firebase_crashlytics: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
firebase_storage: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
Apologies for the misinformation above - Xcode 14.1+ (which implies macos-12.5+) is the current minimum requirements for build.
It appears that you need to update your flutter firebase modules in order to take advantage of the new versions that work again @Finni123 - you can't specify 10.21.0 of this dependency but run flutter firebase modules that want 10.18.0
I'm receiving the same error with RN. to reproduce:
- run
npx react-native@latest init AwesomeProject
to generate a new RN project - Add in the podfile
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.21.0'
- run pod install
the final podfile is
# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
'require.resolve(
"react-native/scripts/react_native_pods.rb",
{paths: [process.argv[1]]},
)', __dir__]).strip
platform :ios, min_ios_version_supported
prepare_react_native_project!
# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```js
# module.exports = {
# dependencies: {
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => linkage.to_sym
end
target 'AwesomeProject' do
config = use_native_modules!
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.21.0'
use_react_native!(
:path => config[:reactNativePath],
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
:flipper_configuration => flipper_config,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
target 'AwesomeProjectTests' do
inherit! :complete
# Pods for testing
end
post_install do |installer|
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false
)
end
end
Error Msg:
Command `pod install` failed.
└─ Cause: CocoaPods could not find compatible versions for pod "FirebaseFirestoreBinary":
In Podfile:
FirebaseFirestore (from `https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag `10.21.0`) was resolved to 10.21.0, which depends on
FirebaseFirestoreBinary (= 10.21.0)
None of your spec sources contain a spec satisfying the dependency: `FirebaseFirestoreBinary (= 10.21.0)`.
You have either:
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
pod install --repo-update --ansi exited with non-zero code: 31
Hi @mikehardy I'm using macOS 14.3.1 with CocoaPods 1.15.2 and when I include this using:
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.18.0'
...it doesn't work, it gives me:
Launching lib/main.dart on iPhone 15 Pro in debug mode...
Xcode build done. 226.4s
Failed to build iOS app
Swift Compiler Error (Xcode): Compiling for iOS 11.0, but module 'FirebaseSharedSwift' has a minimum deployment target of iOS 15.0: /[...]/build/ios/Debug-iphonesimulator/FirebaseSharedSwift/FirebaseSharedSwift.framework/Modules/FirebaseSharedSwift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
/[...]/build/ios/Debug-iphonesimulator/XCFrameworkIntermediates/FirebaseFirestore/Base/FirebaseFirestore.framework/Modules/FirebaseFirestore.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface:6:7
x86_64-apple-ios-simulator.private.swiftinterface:6
Swift Compiler Error (Xcode): Failed to build module 'FirebaseFirestore'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51)', while this compiler is 'Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)'). Please select a toolchain which matches the SDK.
/[...]/build/ios/Debug-iphonesimulator/XCFrameworkIntermediates/FirebaseFirestore/Base/FirebaseFirestore.framework/Modules/FirebaseFirestore.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface:0:0
Could not build the application for the simulator.
Error launching application on iPhone 15 Pro.
Exited (1).
It works if I comment out this line in my Podfile, the build is just very slow though. The iOS deployment target in Xcode is 15.0.
I've done pod deintegrate && pod update && pod install
to make sure my specs are up to date, and when I re-ran it, it stayed the same.
My Podfile looks like this:
# 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
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.18.0'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
end
end
@anthonymoretti Update the tag to 10.21.0
@anthonymoretti Update the tag to 10.21.0
Thanks @paulb777, but I've tried 10.21.0 (and 10.20.0 and 10.19.0) and I get the more common error message I'm familiar with and have dealt with before by bumping the tag, but can't seem to resolve it this time:
Launching lib/main.dart on iPhone 15 Pro in debug mode...
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Fetching external sources
-> Pre-downloading: `FirebaseFirestore` from `https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag `10.21.0`
> Copying FirebaseFirestore from `/Users/anthonymoretti/Library/Caches/CocoaPods/Pods/External/FirebaseFirestore/18abdb02eee30d389315dbe4ee0a4476` to `Pods/FirebaseFirestore`
-> Fetching podspec for `Flutter` from `Flutter`
...
-> Fetching podspec for `firebase_analytics` from `.symlinks/plugins/firebase_analytics/ios`
firebase_analytics: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_app_check` from `.symlinks/plugins/firebase_app_check/ios`
firebase_app_check: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_auth` from `.symlinks/plugins/firebase_auth/ios`
firebase_auth: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
firebase_core: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_crashlytics` from `.symlinks/plugins/firebase_crashlytics/ios`
Run script to upload symbols already exists.
firebase_crashlytics: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_dynamic_links` from `.symlinks/plugins/firebase_dynamic_links/ios`
firebase_dynamic_links: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_performance` from `.symlinks/plugins/firebase_performance/ios`
firebase_performance: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_storage` from `.symlinks/plugins/firebase_storage/ios`
firebase_storage: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
...
Resolving 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_e_a_a.txt exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/e/a/a/FirebaseFirestoreBinary/10.20.0/FirebaseFirestoreBinary.podspec.json 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.21.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.18.0/Firebase.podspec.json exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: all_pods_versions_6_1_e.txt exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/6/1/e/nanopb/2.30909.1/nanopb.podspec.json exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: all_pods_versions_1_6_1.txt exists! Returning local because checking is only performed in repo update
...
[!] CocoaPods could not find compatible versions for pod "FirebaseFirestoreBinary":
In Podfile:
FirebaseFirestore (from `https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag `10.21.0`) was resolved to 10.21.0, which depends on
FirebaseFirestoreBinary (= 10.21.0)
None of your spec sources contain a spec satisfying the dependency: `FirebaseFirestoreBinary (= 10.21.0)`.
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
/Users/anthonymoretti/.rvm/gems/ruby-3.2.2/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:317:in `raise_error_unless_state'
/Users/anthonymoretti/.rvm/gems/ruby-3.2.2/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:299:in `block in unwind_for_conflict'
<internal:kernel>:90:in `tap'
/Users/anthonymoretti/.rvm/gems/ruby-3.2.2/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in `unwind_for_conflict'
...
/Users/anthonymoretti/.rvm/gems/ruby-3.2.2/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Users/anthonymoretti/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:52:in `run'
/Users/anthonymoretti/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/bin/pod:55:in `<top (required)>'
/Users/anthonymoretti/.rvm/gems/ruby-3.2.2/bin/pod:25:in `load'
/Users/anthonymoretti/.rvm/gems/ruby-3.2.2/bin/pod:25:in `<main>'
/Users/anthonymoretti/.rvm/gems/ruby-3.2.2/bin/ruby_executable_hooks:22:in `eval'
/Users/anthonymoretti/.rvm/gems/ruby-3.2.2/bin/ruby_executable_hooks:22:in `<main>'
Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
To update the CocoaPods specs, run:
pod repo update
Error running pod install
Error launching application on iPhone 15 Pro.
Exited (1).
I've tried pod repo update
and pod install --repo-update
, and I've tried this after doing pod deintegrate && pod update && pod install
with the latest 10.21.0 tag in my Podfile.
When I comment out the line from my Podfile and everything works my Podfile.lock has - Firebase/Firestore (= 10.18.0)
in it.
firebase_analytics: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
Your firebase packages are not new enough to take advantage of the fix here.
You need the newest firebase packages then I believe 10.21.0 is the tag you want
firebase_analytics: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
Your firebase packages are not new enough to take advantage of the fix here. You need the newest firebase packages then I believe 10.21.0 is the tag you want
Thanks very much @mikehardy, that did the trick. It's working with tag 10.20.0 (not with 10.21.0) for me. Saving me massive build times again, thank you.
I manually updated all Firebase and Firestore entries in pubspec.yaml
to latest, and downgraded another package that wasn't compatible with that. I had wrongly assumed that flutter pub upgrade
was keeping Firestore packages at latest possible, but that obviously depends on other package constraints too. Now I know, thank you.
I think we can safely close this issue out 👍