From 111f5c5942826ea8e18bc61099cdb6da80606ed0 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Tue, 19 Nov 2024 13:54:11 -0500 Subject: [PATCH 1/3] docs(app, ios): update docs to reflect 11.5.0 firebase-ios-sdk version missed this during the SDK update --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 09d8b85379..9c7547ec2d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -305,7 +305,7 @@ Open your projects `/ios/Podfile` and add any of the globals shown below to the ```ruby # Override Firebase SDK Version -$FirebaseSDKVersion = '11.4.0' +$FirebaseSDKVersion = '11.5.0' ``` Once changed, reinstall your projects pods via pod install and rebuild your project with `npx react-native run-ios`. From 864ea008c393c1d5199c59195eae17d41dd16067 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Tue, 19 Nov 2024 13:54:39 -0500 Subject: [PATCH 2/3] docs(app): clarify when sdk override is useful, problems it may cause --- docs/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index 9c7547ec2d..c5f7c8285c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -267,10 +267,10 @@ React Native Firebase internally sets the versions of the native SDKs which each is tested against a fixed set of SDK versions (e.g. Firebase SDKs), allowing us to be confident that every feature the library supports is working as expected. -Sometimes it's required to change these versions to play nicely with other React Native libraries; therefore we allow +Sometimes it's required to change these versions to play nicely with other React Native libraries or to work around temporary build failures; therefore we allow manually overriding these native SDK versions. -> Using your own SDK versions is generally not recommended as it can lead to breaking changes in your application. Proceed with caution. +> Using your own SDK versions is not recommended and not supported as it can lead to unexpected build failures when new react-native-firebase versions are released that expect to use new SDK versions. Proceed with caution and remove these overrides as soon as possible when no longer needed. #### Android From c4b88f0a9cd0fe3845ae86d18fec14ce11596c33 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Tue, 19 Nov 2024 13:47:55 -0500 Subject: [PATCH 3/3] feat(ios, sdk): allow FIREBASE_SDK_VERSION override This should make it easier for Expo folks to override the SDK when they need to --- docs/index.md | 2 ++ packages/app/RNFBApp.podspec | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/docs/index.md b/docs/index.md index c5f7c8285c..027c12042d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -310,6 +310,8 @@ $FirebaseSDKVersion = '11.5.0' Once changed, reinstall your projects pods via pod install and rebuild your project with `npx react-native run-ios`. +Alternatively, if you cannot edit the Podfile easily (as when using Expo), you may add the environment variable `FIREBASE_SDK_VERSION=11.5.0` (or whatever version you need) to the command line that installs pods. For example `FIREBASE_SDK_VERSION=11.5.0 yarn expo prebuild --clean` + ### Increasing Android build memory As you add more Firebase modules, there is an incredible demand placed on the Android build system, and the default memory diff --git a/packages/app/RNFBApp.podspec b/packages/app/RNFBApp.podspec index 2a907161ed..d37d9e4b99 100644 --- a/packages/app/RNFBApp.podspec +++ b/packages/app/RNFBApp.podspec @@ -27,6 +27,11 @@ Pod::Spec.new do |s| # React Native dependencies s.dependency 'React-Core' + if (ENV.include?('FIREBASE_SDK_VERSION')) + Pod::UI.puts "#{s.name}: Found Firebase SDK version in environment '#{ENV['FIREBASE_SDK_VERSION']}'" + $FirebaseSDKVersion = ENV['FIREBASE_SDK_VERSION'] + end + if defined?($FirebaseSDKVersion) Pod::UI.puts "#{s.name}: Using user specified Firebase SDK version '#{$FirebaseSDKVersion}'" firebase_sdk_version = $FirebaseSDKVersion