Create Firebase project
If you have not done so already, create a Firebase project for your app by clicking on Add project in the Firebase Console.
This will guide you through a series of steps to create your own Firebase project.
Managed Workflow Setup
Some (but not all) native Firebase features can be used with the Managed Workflow. The most notable native feature is Firebase Analytics,
Open Project overview in the firebase console and click on the Android icon or + button to Add Firebase to your Android app.
Make sure that the Android package name is the same as the value of android.package in your app.json.
Register the app & download the config file by clicking "Download google-services.json" and drag the file into your Expo project folder.
Add the relative path to the Android google-services.json file to app.json.
In the bare workflow, the firebase configuration needs to be added according to the native Firebase SDK installation guides
for iOS and Android.
Below you will find a tailored instruction for use with react-native and the Expo Bare Workflow.
Rebuild your iOS project to see the changes: yarn react-native run-ios
Usage with react-native-firebase
After following the iOS and Android setup, you can optionally configure your project to work with react-native-firebase version 6 as well.
Install the react-native-firebase packages (e.g. yarn add @react-native-firebase/app @react-native-firebase/auth etc..)
On iOS, Ensure your ios/Podfile has the following lines:
# At the top of the file
require_relative '../node_modules/react-native-unimodules/cocoapods'# ...# Automatically detect installed unimodules
use_unimodules!# The community version of use_unimodules (used for react-native-firebase)