The namespaced API (the firebase-js-sdk
< v9chaining style) was removed in v26 from the packages listed in the Migrating to v26 guide. Use the modular API (the firebase-js-sdk>= v9style) shown throughout this documentation.
React Native Firebase is the officially recommended collection of packages that brings React Native support for all Firebase services on both Android and iOS apps.
React Native Firebase fully supports React Native apps built using React Native CLI or using Expo.
Source: github.com/invertase/react-native-firebase · Packages: npmjs.com/org/react-native-firebase (@react-native-firebase/app, @react-native-firebase/auth, @react-native-firebase/firestore, and one package per Firebase service)
Use React Native Firebase (this project) when your app runs on Android and/or iOS: it wraps the native Firebase Android and iOS SDKs directly, so you get capabilities the web SDK cannot provide on mobile, like native app analytics, background/killed-state push notifications, and native Crashlytics crash reports.
Use the plain firebase-js-sdk when you're targeting web, React Native Web, or another JavaScript-only environment with no native module support. React Native Firebase already falls back to firebase-js-sdk on those platforms; see Other / Web below.
Before installing, confirm these version pins. You also need a React Native or Expo app and a Firebase project:
{/* prettier-ignore */}
| Requirement | Version |
|---|---|
| React Native | New Architecture enabled. @react-native-firebase/app declares the peer range >=0.60.0-0 (not a tested floor). Tested on 0.88.0-rc.3 (Expo 58.0.0) |
| Expo (when using Expo) | @react-native-firebase/app declares the optional peer range >=47.0.0 (not a tested floor). Tested on Expo 58.0.0 (React Native 0.88.0-rc.3) |
| Xcode (iOS builds) | >= 26.2 |
| Firebase Apple SDK | 13.1.1 (default pin) |
| Firebase Android SDK | 35.0.2 (default pin, Firebase Android BoM) |
Android minSdk | 24 |
| iOS deployment target | 15.0 |
| JDK (Android builds) | >= 17 |
From v26, every React Native Firebase package with a native bridge requires New Architecture. firebase-ios-sdk 12.12.0 and newer require Xcode 26.2 or newer; v27 pins firebase-ios-sdk 13.1.1. Apple's Upcoming SDK minimum requirements state that App Store Connect uploads from 2026-04-28 must use the platform 26 SDKs.
Integration with Expo is possible when using a development build. You can configure the project via config plugins or manually configure the native projects yourself (the "bare workflow").
NOTE: React Native Firebase cannot be used in the pre-compiled Expo Go app because React Native Firebase uses native code that is not compiled into Expo Go.
Warning: A forced native crash (such as
crash(getCrashlytics())) from anexpo-dev-clientdevelopment build usually does not reach Firebase Crashlytics. Crashlytics collection is off in debug builds unless you setcrashlytics_debug_enabled(see Enable debug crash logs), and on iOS an attached debugger stops the crash before Crashlytics records it (see the FAQ). You do not need to removeexpo-dev-client. To test crash reporting, build a release variant (for examplenpx expo run:ios --configuration Releaseornpx expo run:android --variant release), trigger the crash, then relaunch the app so Crashlytics can send the report.
To create a new Expo project, see the Get started guide in Expo documentation.
To install React Native Firebase's base app module, use the command npx expo install @react-native-firebase/app.
Similarly you can install other React Native Firebase modules such as for Authentication and Crashlytics: npx expo install @react-native-firebase/auth @react-native-firebase/crashlytics.
The recommended approach to configure React Native Firebase is to use Expo Config Plugins. You will add React Native Firebase modules to the plugins array of your app.json or app.config.js. See the note below to determine which modules require Config Plugin configurations.
If you are instead manually adjusting your Android and iOS projects (this is not recommended), follow the same instructions as React Native CLI projects.
To enable Firebase on the native Android and iOS platforms, create and download the Firebase config files for each platform from your Firebase project. Then provide paths to the downloaded google-services.json and GoogleService-Info.plist files in the following app.json fields: expo.android.googleServicesFile and expo.ios.googleServicesFile. See the example configuration below.
For iOS, React Native Firebase resolves the Firebase Apple SDK with Swift Package Manager (v27 is SPM-only) on React Native 0.75+. SPM requires dynamic frameworks — configure expo-build-properties with "useFrameworks": "dynamic". See the example configuration below.
The following is an example app.json to enable the React Native Firebase modules App, Auth and Crashlytics, that specifies the Firebase config files for both mobile platforms, and that sets the application ID to the example value of com.mycorp.myapp (change to match your own).
You will need to add a plugin entry for each react-native-firebase module you use that defines an Expo config plugin - these are documented on the specific module install pages.
Place google-services.json and GoogleService-Info.plist at the paths referenced below (or update the paths). Then write this config before running npx expo prebuild / EAS Build.
// File: app.json (or the object returned by app.config.js). Apply before npx expo prebuild / EAS Build.
{
"expo": {
"android": {
"googleServicesFile": "./google-services.json",
"package": "com.mycorp.myapp"
},
"ios": {
"googleServicesFile": "./GoogleService-Info.plist",
"bundleIdentifier": "com.mycorp.myapp"
},
"plugins": [
"@react-native-firebase/app",
"@react-native-firebase/auth",
"@react-native-firebase/crashlytics",
[
"expo-build-properties",
{
"ios": {
"useFrameworks": "dynamic"
}
}
]
]
}
}Listing a module in the Config Plugins (the
"plugins"array in the JSON above) is only required for React Native Firebase modules that involve native installation steps - e.g. modifying the Xcode project,Podfile,build.gradle,AndroidManifest.xmletc. React Native Firebase modules without native steps will work out of the box; no"plugins"entry is required. Not all modules have Expo Config Plugins provided yet. A React Native Firebase module has Config Plugin support if it contains anapp.plugin.jsfile in its package directory (e.g.node_modules/@react-native-firebase/app/app.plugin.js).
If you use @react-native-firebase/analytics with Expo, including EAS Build, and want to configure iOS Analytics Podfile flags, add the Analytics config plugin to the same expo.plugins array in app.json / app.config.js (after @react-native-firebase/app), then re-run prebuild:
// File: app.json — one entry inside expo.plugins[]. Add after @react-native-firebase/app; re-run prebuild after editing.
{
"expo": {
"plugins": [
"@react-native-firebase/app",
[
"@react-native-firebase/analytics",
{
"ios": {
"withoutAdIdSupport": true,
"googleAppMeasurementOnDeviceConversion": true
}
}
]
]
}
}The withoutAdIdSupport option adds $RNFirebaseAnalyticsWithoutAdIdSupport = true to opt out of iOS Ad ID support. The googleAppMeasurementOnDeviceConversion option adds $RNFirebaseAnalyticsGoogleAppMeasurementOnDeviceConversion = true to include Google Analytics on-device conversion measurement support. You may omit either option if it is not needed. Merge this Analytics plugin entry into your existing plugins list rather than replacing unrelated plugins.
React Native Firebase v27 (Firebase Apple SDK 13+) is SPM-only. Do not pass disableSPM: true to the @react-native-firebase/app config plugin or set "useFrameworks": "static". pod install and prebuild fail with either. Set "useFrameworks": "dynamic" through expo-build-properties instead. See iOS SPM Support for details. Write this into app.json / app.config.js before the next npx expo prebuild --clean:
// File: app.json (or app.config.js). Dynamic frameworks for SPM. Apply before npx expo prebuild --clean.
{
"expo": {
"plugins": [
"@react-native-firebase/app",
[
"expo-build-properties",
{
"ios": {
"useFrameworks": "dynamic"
}
}
]
]
}
}If you are compiling your app locally, run npx expo prebuild --clean to generate the native project directories. Then, follow the local app compilation steps described in Local app development guide in Expo docs. If you prefer using a build service, refer to EAS Build.
Note: if you have already installed an Expo development build (using something like npx expo run after doing the --prebuild local development steps...) before installing react-native-firebase, then you must uninstall it first as it will not contain the react-native-firebase native modules and you will get errors with RNFBAppModule not found etc. If so, uninstall the previous development build, do a clean build using npx expo prebuild --clean, and then attempt npx expo run:<platform> again.
If you are using the Expo Tools VSCode extension, the IntelliSense will display a list of available plugins when editing the plugins section of app.json.
Installing React Native Firebase to a RN CLI project requires a few steps; installing the NPM module, adding the Firebase config files & rebuilding your application.
Install the React Native Firebase "app" module to the root of your React Native project with NPM or Yarn:
# Project root. Step 1 of React Native CLI install (before Android/iOS native config).
# Using npm:
npm install --save @react-native-firebase/app
# Using Yarn:
yarn add @react-native-firebase/appThe @react-native-firebase/app module must be installed before using any other Firebase service.
To allow the Android app to securely connect to your Firebase project, a configuration file must be downloaded and added to your project.
On the Firebase console, add a new Android application and enter your projects details. The "Android package name" must match your
local projects package name which can be found inside of the namespace field in /android/app/build.gradle, or in the
manifest tag within the /android/app/src/main/AndroidManifest.xml file within your project for projects using android gradle plugin v7 and below
The debug signing certificate is optional to use Firebase with your app, but is required for Phone Authentication. To list your signing certificates run
cd android && ./gradlew signingReport. It prints one entry per build variant. Copy both the 'SHA1' and 'SHA-256' values from the 'debug' variant and add them to the 'SHA certificate fingerprints' on your app in the Firebase console. For release builds, also add the SHA-1 and SHA-256 of your release key, or of the Google Play App Signing key if Google Play signs your app.
Download the google-services.json file and place it inside of your project at the following location: /android/app/google-services.json.
To allow Firebase on Android to use the credentials, the google-services plugin must be enabled on the project. This requires modification to two
files in the Android directory. Apply them in order: project build.gradle first, then app build.gradle.
First, add the google-services plugin as a dependency inside of your /android/build.gradle file:
// File: android/build.gradle (project-level). Step 1 of 2 for google-services (before android/app/build.gradle).
// Add this classpath inside the existing buildscript { dependencies { } } block:
classpath 'com.google.gms:google-services:4.5.0'Next, execute the plugin by adding the following to your /android/app/build.gradle file:
// File: android/app/build.gradle. Step 2 of 2 for google-services (after project-level classpath).
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'To allow the iOS app to securely connect to your Firebase project, a configuration file must be downloaded and added to your project, and you must enable dynamic frameworks (v27 is SPM-only, see Dynamic frameworks in the Podfile below).
On the Firebase console, add a new iOS application and enter your projects details. The "iOS bundle ID" must match your local project bundle ID. The bundle ID can be found within the "General" tab when opening the project with Xcode.
Download the GoogleService-Info.plist file.
Using Xcode, open the projects /ios/{projectName}.xcodeproj file (or /ios/{projectName}.xcworkspace if using Pods).
Right click on the project name and "Add files" to the project, as demonstrated below:

Select the downloaded GoogleService-Info.plist file from your computer, and ensure the "Copy items if needed" checkbox is enabled.

To allow Firebase on iOS to use the credentials, the Firebase iOS SDK must be configured during the bootstrap phase of your application.
Open /ios/{projectName}/AppDelegate.swift. Add import Firebase with your other imports (for example after import ReactAppDependencyProvider), then call FirebaseApp.configure() at the start of application(_:didFinishLaunchingWithOptions:) before the rest of your startup code:
// File: ios/{projectName}/AppDelegate.swift (React Native 0.77+). Insertion fragment, not a complete file.
// 1) Add this import with your other imports (for example after `import ReactAppDependencyProvider`):
import Firebase
// 2) In your EXISTING application(_:didFinishLaunchingWithOptions:) method, add FirebaseApp.configure()
// as the first line. Keep your template's signature (some templates declare it `override`).
// Inside your existing AppDelegate class:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
FirebaseApp.configure() // <- add this line
// ... the rest of your existing method, unchanged: React Native startup code and the existing return ...
}Only add those two lines. Do not replace your AppDelegate class or the application(_:didFinishLaunchingWithOptions:) method: the template code in that method starts React Native.
To allow Firebase on iOS to use the credentials, the Firebase iOS SDK must be configured during the bootstrap phase of your application.
Open /ios/{projectName}/AppDelegate.mm (or AppDelegate.m on older React Native). Add #import <Firebase.h> after #import "AppDelegate.h", then call [FIRApp configure] at the start of application:didFinishLaunchingWithOptions: before the rest of your startup code:
// File: ios/{projectName}/AppDelegate.mm (or AppDelegate.m) for React Native < 0.77. Insertion fragment, not a complete file.
// 1) Add this import right after #import "AppDelegate.h":
#import <Firebase.h>
// 2) In your EXISTING didFinishLaunchingWithOptions method, add [FIRApp configure] as the first line.
// Inside your existing @implementation AppDelegate:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[FIRApp configure]; // <- add this line
// ... the rest of your existing method, unchanged: React Native startup code and the existing return ...
}Only add those two lines. Do not replace your AppDelegate or the didFinishLaunchingWithOptions method: the template code in that method starts React Native.
React Native Firebase v27 is SPM-only: it resolves the Firebase Apple SDK with Swift Package Manager on React Native 0.75+, which requires dynamic linkage.
Open the file ./ios/Podfile and add this line at the top level, after prepare_react_native_project! and before your target block. Do this before pod install:
# File: ios/Podfile. Top level, after prepare_react_native_project! and before the app target block. Required for SPM (RN 0.75+). Run pod install after editing.
use_frameworks! :linkage => :dynamicDo not use use_frameworks! :linkage => :static (or omit use_frameworks!). pod install rejects static linkage with SPM. There is no CocoaPods Firebase path to fall back to. Full requirements, Expo notes, and troubleshooting are in iOS SPM Support.
Once the above steps have been completed, the React Native Firebase library must be linked to your project and your application needs to be rebuilt.
Users on React Native 0.60+ automatically have access to "autolinking", requiring no further manual installation steps. To automatically link the package, rebuild your project after the Android and iOS steps above:
# Project root. Final React Native CLI step after npm install and Android/iOS native config.
# Android:
npx react-native run-android
# iOS:
cd ios/
pod install --repo-update
cd ..
npx react-native run-iosOnce successfully linked and rebuilt, your application will be connected to Firebase using the @react-native-firebase/app module. This module does not provide much functionality, therefore to use other Firebase services, each of the modules for the individual Firebase services need installing separately.
If you are using the firebase-js-sdk fallback support for web or "other" platforms then you must initialize Firebase dynamically by calling initializeApp.
Prerequisites for this section: @react-native-firebase/app installed; on Android/iOS you still complete the native config above. On web / Other platforms only, call initializeApp with your Firebase web app config (from the Firebase console) during bootstrap. Do not call initializeApp for the default app on native Android/iOS when google-services.json / GoogleService-Info.plist already configure the default app.
At some point during your application's bootstrap processes, initialize firebase like this:
import { Platform } from 'react-native';
import { getApp, initializeApp } from '@react-native-firebase/app';
if (Platform.OS === 'web') {
const firebaseConfig = {
apiKey: 'api-key',
authDomain: 'project-id.firebaseapp.com',
databaseURL: 'https://project-id.firebaseio.com',
projectId: 'project-id',
storageBucket: 'project-id.appspot.com',
messagingSenderId: 'sender-id',
appId: 'app-id',
measurementId: 'G-measurement-id',
};
await initializeApp(firebaseConfig);
}
const firebaseApp = getApp();
console.log('Default app name:', firebaseApp.name);Replace the placeholder firebaseConfig values with the web app config from the Firebase console. After initialization, use React Native Firebase modular APIs as on native (for example getApp() above).
React Native Firebase internally sets the versions of the native SDKs which each module uses. Each release of the library is tested against a fixed set of SDK versions (e.g. Firebase SDKs), allowing us to be confident that every feature the library supports is working as expected.
Sometimes it's required to change these versions to play nicely with other React Native libraries or to work around temporary build failures; therefore we allow manually overriding these native SDK versions.
Using your own SDK versions is not recommended and not supported as it can lead to unexpected build failures when new react-native-firebase versions are released that expect to use new SDK versions. Proceed with caution and remove these overrides as soon as possible when no longer needed.
Within your projects /android/build.gradle file, provide your own versions by specifying any of the following options shown below. The defaults in v27 are minSdk 24, targetSdk 34, compileSdk 34, and Firebase Android bill of materials 35.0.2. Every number in the example differs from those defaults and is only illustrative; set only the keys you need to change. Edit this file before rebuilding with npx react-native run-android:
// File: android/build.gradle (project-level). Optional SDK overrides. Apply before the next Android rebuild.
// Every value below differs from the v27 defaults (minSdk 24, targetSdk 34, compileSdk 34, BoM 35.0.2) and is only illustrative.
project.ext {
set('react-native', [
versions: [
android : [
minSdk : 25,
targetSdk : 33,
compileSdk: 35,
],
firebase: [
bom: "34.19.0"
],
],
])
}Once changed, rebuild your application with npx react-native run-android.
Firebase Apple SDK 13+ is resolved via Swift Package Manager. $FirebaseSDKVersion and FIREBASE_SDK_VERSION override the SPM exact pin (the same version string RNFB passes to firebase-ios-sdk SPM). They are not CocoaPods trunk version selectors.
Open your projects /ios/Podfile and add any of the globals shown below to the top of the file before pod install. The default Firebase Apple SDK in v27 is 13.1.1; replace the version in the example with the exact version you need:
# File: ios/Podfile (top of file, before target blocks). Optional Firebase Apple SDK SPM exact pin override (see /ios-spm). Run pod install after editing.
# 13.1.1 is the v27 default; replace it with the exact pin you need.
$FirebaseSDKVersion = '13.1.1'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=13.1.1 (or whatever SPM exact pin you need) to the command line that installs pods. For example FIREBASE_SDK_VERSION=13.1.1 yarn expo prebuild --clean
On Android, React Native Firebase uses thread pool executor to provide improved performance and managed resources.
To increase throughput, you can tune the thread pool executor via firebase.json file within the root of your project. Create or edit this file before the next native rebuild:
{
"react-native": {
"android_task_executor_maximum_pool_size": 10,
"android_task_executor_keep_alive_seconds": 3
}
}{/* prettier-ignore */}
| Key | Description |
|---|---|
android_task_executor_maximum_pool_size | Maximum pool size of ThreadPoolExecutor. Defaults to 1. Larger values typically improve performance when executing large numbers of asynchronous tasks, e.g. Firestore queries. Setting this value to 0 completely disables the pooled executor and all tasks execute in serial per module. |
android_task_executor_keep_alive_seconds | Keep-alive time of ThreadPoolExecutor, in seconds. Defaults to 3. Excess threads in the pool executor will be terminated if they have been idle for more than the keep-alive time. This value doesn't have any effect when the maximum pool size is lower than 2. |

Core / App