Closed wyxcoder closed 4 months ago
"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:
npx react-native@latest init AwesomeProject
to generate a new RN projectpod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.21.0'
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:
@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:
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.
@anthonymoretti
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
@anthonymoretti
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 👍
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 byFirebaseFirestore
Any suggestion how to solve this?
Thanks