feat(app, sdk): allow env var override of firebase-ios-sdk value #8147
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When there are build breaks like happened with firebase-ios-sdk 11.4.1, people need to override the firebase-ios-sdk value, but it is not easy to do in a managed / no-native-code environment like Expo where you cannot easily modify the Podfile
It easy to send an environment variable through though, so I checked overriding it that way, and not only does it work but it is sufficient to do so in the RNFBApp.podspec alone
No config plugin needed, no dangerous Podfile mod needed
I also took the opportunity to make the risk of overriding the SDK versions much more specific, since users are still surprised by build errors when we adopt new SDK semver minors and start using the new symbols, while users with overrides don't get the new SDK and have a build error
Related issues
Release Summary
Some conventional commits, rebase-merge should do it
Checklist
Android
iOS
e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__
Test Plan
In an expo app with react-native-firebase (app, and others) installed, expo-dev-client installed, run:
yarn expo prebuild --clean
You should see 11.5.0 pods installed by default at the time of this writing, it works just fine still, with no environment variable specified
Then do it again but with 11.4.2 specified via environment variable, see they all get switched:
So it appears to work as expected with one little stanza in RNFBApp.podspec, and it doesn't break if no env var is specified
Think
react-native-firebase
is great? Please consider supporting the project with any of the below:React Native Firebase
andInvertase
on Twitter