MobileReact nativeExpo
Firebase Remote Config Setup
Remote Config is a versatile way to control the app without rebuilding the app for updates or using OTA Updates (EAS Updates).
It can be used for:
- static data which might frequently changed or if changed should be reflected instantly
- feature flag
- force update (min_version) version definition
What makes firebase remote config also powerful are:
- it has no limits
- we can configure conditional for each parameter / key
Setup - React Native Firebase
This guide is used if we require access to firebase services not supported by Firebase JS SDK (Crashlytics, Remote Config - as remote config JS SDK needs IndexedDB access).
React Native Firebase requires custom native code and cannot be used with Expo Go.
Pre-Requisites
- Create Firebase Project ([optional suggestion] one for dev/staging and one for production)
- Add Android and iOS app to each project, download the
google-services.json
andGoogleServices-Info.plist
Installation Steps
-
Install
expo-dev-client
-
Install React Native Firebase
-
Update
app.config.json
/app.config.ts
/app.config.js
- make sure
ios.bundleIdentifier
andandroid.package
is defined - define the google services file location in
ios.googleServicesFile
andandroid.googleServicesFile
- Add
@react-native-firebase/*
toplugins
for each@react-native-firebase/*
which hasapp.config.js
- make sure
-
Install RN Firebase remote config
RN Firebase Remote Config requires analytics module to be installed first
References: https://rnfirebase.io/remote-config/usage