Skip to content

Commit

Permalink
feat(ios, sdk): allow FIREBASE_SDK_VERSION override
Browse files Browse the repository at this point in the history
This should make it easier for Expo folks to override the SDK when
they need to
  • Loading branch information
mikehardy committed Nov 20, 2024
1 parent 956fe5f commit 8cbe59f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions packages/app/RNFBApp.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8cbe59f

Please sign in to comment.