Hey everyone, happy to announce that as of React Native Firebase version 20.2.0, Vega is now a supported platform.
This post will help you set up React Native Firebase (RNFB) for Vega, which is considered an ‘Other’ platform in the RNFB ecosystem.
To get you started let’s quickly cover installation, supported modules, and relevant links for further information.
Installation
To install React Native Firebase for Vega, follow these steps:
-
Install the base package:
npm install @react-native-firebase/app
-
Install any additional modules you need. For example, to install the authentication module:
npm install @react-native-firebase/auth
-
Get an existing Firebase app config or create a new Firebase web app and retrieve its config from the Firebase console for your Firebase project here.
-
Initialise Firebase with your config in your Vega project:
import firebase from "@react-native-firebase/app";
// Add imports for the Firebase services you require, e.g. Auth:
import "@react-native-firebase/auth";
const firebaseConfig = {
apiKey: "...",
authDomain: "....firebaseapp.com",
databaseURL: "https://....firebaseio.com",
projectId: "...",
storageBucket: "....appspot.com",
appId: "1:...:web:...",
measurementId: "G-..."
};
// Initialize Firebase.
await firebase.initializeApp(firebaseConfig);
// Now use Firebase services, e.g.:
// Sign-in a user:
const userCredential = await firebase.auth()
.signInWithEmailAndPassword('hello@world.com', 'kepler');
Further detailed documentation is available at https://rnfirebase.io/
Supported Modules
Currently for Vega there are only specific Firebase services that are supported. Here’s a summary of the supported modules:
Analytics (fully supported except for automatic events)
App Check (partial support, only CustomProvider)
App/Core (fully supported)
Authentication (partial support, limitations on phone auth and multi-factor auth)
Realtime Database (fully supported, but no offline persistence)
Firestore (partial support, limitations on offline persistence and some methods)
Cloud Functions (fully supported)
Remote Config (fully supported)
Cloud Storage (partial support, limitations on file operations)
Important Links
- React Native Firebase Documentation
- React Native Firebase & Vega limitations
- Note: Vega is classed as an ‘Other’ platform in React Native Firebase.
- React Native Firebase GitHub Repository
Reporting Issues
If you encounter any issues specific to using React Native Firebase with Vega/‘Other’ platforms, please report them to us at oss@invertase.io.
When reporting an issue, please make sure to:
- Provide detailed steps to reproduce the issue.
- Include relevant code snippets, logs and error messages where possible.
You can enable detailed debugging logs in RNFB by setting the global debugging setting:
global.RNFBDebug = true;
More information on the logging this flag produces can be found here.
Known issues are documented and updated here.
Additional Notes
- Check the documentation for any limitations or differences in behavior compared to native platforms (Android and iOS).
- Keep your React Native Firebase packages updated to ensure you have the latest features and bug fixes for ‘Other’ platform support.
- Vega based apps will appear in the Firebase console as the appId specified in your Firebase credentials that you use in your application. For example if you use a Firebase web project your appId looks similar to
1:448618578101:web:cc6c1dc7a65cc83c
- this means your application appears in the Firebase console as a web app. We recommend creating a new Firebase app in your project and labelling it specific to your Vega app name to allow you to distinguish it from any other apps in your project; new web apps can be created here on your Firebase project.