diff --git a/docs/index.md b/docs/index.md index 09d8b85379..027c12042d 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 @@ -305,11 +305,13 @@ 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`. +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