Skip to content

Commit 8cbe59f

Browse files
committed
feat(ios, sdk): allow FIREBASE_SDK_VERSION override
This should make it easier for Expo folks to override the SDK when they need to
1 parent 956fe5f commit 8cbe59f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

docs/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,8 @@ $FirebaseSDKVersion = '11.5.0'
310310

311311
Once changed, reinstall your projects pods via pod install and rebuild your project with `npx react-native run-ios`.
312312

313+
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`
314+
313315
### Increasing Android build memory
314316

315317
As you add more Firebase modules, there is an incredible demand placed on the Android build system, and the default memory

packages/app/RNFBApp.podspec

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ Pod::Spec.new do |s|
2727
# React Native dependencies
2828
s.dependency 'React-Core'
2929

30+
if (ENV.include?('FIREBASE_SDK_VERSION'))
31+
Pod::UI.puts "#{s.name}: Found Firebase SDK version in environment '#{ENV['FIREBASE_SDK_VERSION']}'"
32+
$FirebaseSDKVersion = ENV['FIREBASE_SDK_VERSION']
33+
end
34+
3035
if defined?($FirebaseSDKVersion)
3136
Pod::UI.puts "#{s.name}: Using user specified Firebase SDK version '#{$FirebaseSDKVersion}'"
3237
firebase_sdk_version = $FirebaseSDKVersion

0 commit comments

Comments
 (0)