Migrating to v26

Migrate to React Native Firebase v26 — namespaced API removal.

Version 26 removes the deprecated namespaced JavaScript API from selected packages. Each migrated package is modular-only: use getX(app?) and root-level helper functions from the package entry point. Namespaced default exports, firebase.<module>(), and Firebase*Types namespaces are removed from those packages.

If you are upgrading from v24 or earlier, complete Migrating to v25 first — v25 TypeScript alignment changes still apply.

Table of contents

New Architecture requirement

From v26 onward, every React Native Firebase package with a native bridge is implemented as a Codegen TurboModule and requires React Native's New Architecture. The legacy bridge modules were removed in the coordinated v26 break.

If you cannot enable New Architecture yet, stay on v25 (or v23 if you still depend on legacy-architecture Cloud Functions — see below).

Exceptions (no New Architecture requirement)

PackageWhy
@react-native-firebase/aiPure JavaScript — uses the firebase-js-sdk web interop layer; no native TurboModule.
@react-native-firebase/vertexaiPure JavaScript — same as ai; deprecated in favor of @react-native-firebase/ai.

Cloud Functions (already required since v24)

@react-native-firebase/functions has required New Architecture since v24 (Migrating to v24 — Cloud Functions). v26 extends the same requirement to all remaining native modules.

Enable New Architecture

React Native CLI (Android) — set in android/gradle.properties:

properties
newArchEnabled=true

React Native CLI (iOS) — New Architecture is enabled when RCT_NEW_ARCH_ENABLED=1 during pod install (React Native sets this from newArchEnabled on recent templates). Follow the React Native New Architecture guide for your RN version.

Expo — enable in your app config (Expo SDK 52+):

json
{
  "expo": {
    "newArchEnabled": true
  }
}

Rebuild native projects after changing this (pod install, clean Android build).

If New Architecture is disabled

Native builds fail early with explicit guards:

  • Android: Gradle scripts print New Architecture support is required for @react-native-firebase/<package> and fail the build.
  • iOS: pod install fails with <PodName> requires New Architecture. Enable New Architecture to use this module.

Platform behavior differences

When migrating from firebase-js-sdk web examples, watch for these high-impact runtime divergences:

{/* prettier-ignore */}

Areafirebase-js-sdk (web)React Native Firebase
AuthBrowser persistence, redirects, reCAPTCHA, revokeAccessToken, useDeviceLanguage, linkWithPhoneNumber / reauthenticateWithPhoneNumberNative iOS/Android SDKs manage persistence. Several web-only helpers throw synchronously on React Native (setPersistence, getRedirectResult, revokeAccessToken, useDeviceLanguage, linkWithPhoneNumber, reauthenticateWithPhoneNumber). Use native provider flows instead.
AnalyticsCross-platform modular APIOn-device conversion measurement helpers (initiateOnDeviceConversionMeasurement*) are iOS only; on Android and web the JS layer resolves without calling native (no-op). logTransaction (verified iOS in-app purchase events) is iOS only and rejects on other platforms.
Realtime DatabasegoOnline / goOffline are synchronous; web transport togglesgoOnline / goOffline are synchronous through TurboModules, matching firebase-js-sdk. getServerTime, setPersistenceEnabled, and setPersistenceCacheSizeBytes are RN-specific. forceLongPolling / forceWebSockets throw — transport is native-controlled.
Phone Number VerificationN/A (Android SDK only)Android only — all entry points throw on iOS and Web.
Cloud StorageuploadBytes / uploadString from JS blobs; upload task controls return sync booleanputFile and writeToFile are native-only file-path APIs. UploadTask.pause() / .resume() / .cancel() also return sync boolean values through native TurboModules.
Cloud MessagingWeb push / service-worker surfaceFCM token lifecycle, permissions, background handlers, and APNs token APIs are iOS only. Event delivery still uses the legacy native event proxy during the TurboModule migration; behavior matches pre-v26 releases but will change when Codegen events land in a future release.
Remote Configreset() clears server and local statereset() is Android only — iOS does not clear activated, fetched, or default Remote Config values. setDefaultsFromResource loads from native resource files (.plist / XML).
PerformanceinitializePerformance returns synchronously; trace start/stop are syncinitializePerformance is synchronous on RN (applies settings to the native instance). Trace, HTTP metric, and screen trace start/stop are synchronous through TurboModules, matching firebase-js-sdk.
FirestoreIndexedDB persistence, memoryLocalCache, persistentLocalCache, FieldValue maximum() / minimum() sentinelsLocal cache factories and IndexedDB APIs are web only. Persistence is controlled by the native Firestore SDK. initializeFirestore returns Firestore synchronously. FieldValue maximum() / minimum() are not exported yet because iOS SDK 12.15.0 lacks matching native factories.
App CheckreCAPTCHA version 3 / Enterprise web providersUse ReactNativeFirebaseAppCheckProvider for Device Check, App Attest, Play Integrity, etc. Web reCAPTCHA provider classes have no RN equivalent.
RN-native-only modulesNo web SDKcrashlytics, in-app-messaging, app-distribution, and ml are React Native only — no firebase-js-sdk modular surface.

Per-package notes also appear in each module's usage page under Platform support.

firebase-js-sdk API parity improvements

v26 aligns React Native Firebase modular types and several runtime signatures with firebase-js-sdk where TurboModules removed bridge-forced Promise wrappers. Use this section when porting web SDK examples or when scripted upgrades hit TypeScript or runtime errors.

Migration rule: If a method below is sync, remove await and any .then() / .catch() chain on its return value — sync APIs return void or a value directly; calling .then() on void throws at runtime.

Synchronous APIs enabled by TurboModules

{/* prettier-ignore */}

MethodBefore (pre-v26 / legacy bridge)After (v26)Notes
registerVersion(library, version, variant?)Promise<void> (web)void — throws on RNWeb-only on RN; remove await if copied from web samples
isSignInWithEmailLink(auth, emailLink)Promise<boolean>booleanRemove await
TotpSecret.generateQrCodeUrl(accountName?, issuer?)Promise<string>stringRemove await; omitted args default from current user / app name
trace(…).start() / .stop()Promise<null>voidRemove await on perf trace lifecycle
httpMetric(…).start() / .stop()Promise<null>voidSame as traces
ScreenTrace.start() / .stop()Promise<null>voidSame as traces
startScreenTrace(performance, screenName)Promise<ScreenTrace>ScreenTraceRemove await
goOnline(db) / goOffline(db)Promise<void>voidRemove await
UploadTask.pause() / .resume() / .cancel()Promise<boolean>booleanRemove await; use the returned boolean directly

Type parity improvements

{/* prettier-ignore */}

Export / methodBeforeAfterNotes
onSnapshotsInSync(firestore, observer)next?: () => void; error?: Errornext?: (value: void) => void; error?: FirestoreErrorCallback overload onSnapshotsInSync(firestore, () => {}) unchanged
uploadBytes(ref, data, metadata?)Return type TaskResultUploadResultAlias rename only
uploadBytesResumable(ref, data, metadata?)Return type TaskUploadTaskAlias rename only
Storage / Remote Config error callbacksNativeFirebaseErrorFirebaseError / StorageErrorNativeFirebaseError remains assignable to FirebaseError
AppCheckTokenListenerNot exportedExported type aliasMatches firebase-js-sdk observer typing
FunctionsError, FunctionsErrorCodeCoreMissing or misalignedExported / alignedRegistry + compare-types config
firestore/pipelines (StageOptions, TimeGranularity, isType, …)Declaration driftAligned to SDK .d.tsType-only; no call-shape change

Synchronous modular return values

{/* prettier-ignore */}

MethodBeforeAfterNotes
logEvent(analytics, …)Promise<void>voidFire-and-forget; remove await / .then()
initializeAppCheck(app?, options?)Promise<AppCheck>AppCheckReturns handle immediately; provider setup continues natively
initializeFirestore(app, settings, databaseId?)Promise<Firestore>FirestoreReturns instance immediately; settings() runs on native bridge
getRemoteConfig(app?, options?)(app?) only(app?, options?: RemoteConfigOptions)options accepted for parity; no-op on native
aggregateFieldEqual()Not exportedExportedAggregate query helper
LastFetchStatus literalsUnchanged — native still uses no_fetch_yet / throttled (documented drift)

Firestore parity additions

{/* prettier-ignore */}

Export / methodBeforeAfterNotes
TransactionOptionsNot exportedExportedType for transaction retry options
runTransaction(firestore, updateFunction, options?)No options argumentAccepts options?: TransactionOptions{ maxAttempts?: number } on native iOS and Android; omitted options use the SDK default of 5 retries; explicit values < 1 throw Max attempts must be at least 1 (firebase-js-sdk parity)
aggregateQuerySnapshotEqual()Not exportedExportedAggregate query snapshot equality helper, alongside aggregateFieldEqual()
maximum(n) / minimum(n) FieldValue sentinelsExported by firebase-js-sdk 12.15.0Not exported by RNFB yetAndroid SDK 34.15.0 has native factories, but iOS Firebase Firestore SDK 12.15.0 does not; RNFB waits for cross-platform parity

Observer and Promise pitfalls

{/* prettier-ignore */}

PitfallSymptomFix
.then() on sync APITypeError: … .then is not a functionUse direct call: logEvent(…) not logEvent(…).then(…)
await on sync APIUnnecessary microtask delay; misleading types in strict TSDrop await where the table above marks the API sync
onConfigUpdate(remoteConfig, observer)Runtime throw: observer must include both next and error functionsPass { next: (update) => {…}, error: (err) => {…} } — do not omit error
onSnapshotsInSync observer formType error on error callbackType error as (error: FirestoreError) => void, or use the () => void callback overload
runTransaction(..., { maxAttempts: 0 }) or negativeRuntime throw: Max attempts must be at least 1Omit options for the default 5 attempts, or pass maxAttempts: 1 or higher

General pattern

For each package listed in this guide:

  1. Remove default export / firebase.<module>() usage — import modular helpers from the package root.
  2. Replace Firebase*Types namespace imports with root types (InAppMessaging, Installations, FirebaseML, etc.).
  3. Prefer free functions (getId(installations), setMessagesDisplaySuppressed(inAppMessaging, enabled)) over instance methods on service objects.

Modular-only in v26: @react-native-firebase/app, @react-native-firebase/ml, @react-native-firebase/in-app-messaging, @react-native-firebase/installations, @react-native-firebase/messaging, @react-native-firebase/app-distribution, @react-native-firebase/functions, @react-native-firebase/perf, @react-native-firebase/app-check, @react-native-firebase/remote-config, @react-native-firebase/crashlytics, @react-native-firebase/database, @react-native-firebase/storage, @react-native-firebase/analytics, @react-native-firebase/auth, and @react-native-firebase/firestore. Other packages may still expose the namespaced API with deprecation warnings; modular imports remain the supported path.

App

The namespaced API for @react-native-firebase/app has been removed. This package is modular-only — use named exports such as getApp(), initializeApp(), and getUtils().

Removed namespaced API

RemovedReplacement (modular)
Default export firebaseNamed exports from @react-native-firebase/app
firebase.app(name?)getApp(name?)
firebase.appsgetApps()
firebase.initializeApp(options, name?)initializeApp(options, name?)
firebase.utils(app?)getUtils(app?)
firebase.utils.FilePathFilePath (named export)
firebase.SDK_VERSIONSDK_VERSION (named export)
firebase.setLogLevel(...)setLogLevel(...)
firebase.<module>() accessors on the default exportImport modular helpers from each @react-native-firebase/* package

Example

js
// Previously (removed)
import firebase from '@react-native-firebase/app';

firebase.app().name;
firebase.initializeApp(options, 'secondary');
firebase.utils().FilePath.DOCUMENT_DIRECTORY;
js
// Now
import { getApp, initializeApp, getUtils, FilePath } from '@react-native-firebase/app';

getApp().name;
initializeApp(options, 'secondary');
getUtils().FilePath.DOCUMENT_DIRECTORY;
// or
FilePath.DOCUMENT_DIRECTORY;

Machine Learning (ML)

The namespaced API for @react-native-firebase/ml has been removed. This package is modular-only — use getML(app?).

Removed namespaced API

RemovedReplacement (modular)
firebase.ml()getML() or getML(app)
Default export ml()getML() or getML(app)
FirebaseMLTypes namespaceImport FirebaseML from package root

Example

js
// Previously (removed)
import firebase from '@react-native-firebase/app';
import ml from '@react-native-firebase/ml';

firebase.ml().app.name;
ml().app.name;
js
// Now
import { getApp } from '@react-native-firebase/app';
import { getML } from '@react-native-firebase/ml';

getML().app.name; // default app
getML(getApp('secondaryFromNative')).app.name;

In-App Messaging

The namespaced API for @react-native-firebase/in-app-messaging has been removed. This package is modular-only — use getInAppMessaging() and the root-level helper functions.

There is no firebase/in-app-messaging entry in the firebase-js-sdk modular surface; React Native Firebase follows the same modular service-instance pattern used for other native-only modules.

Removed namespaced API

RemovedReplacement (modular)
firebase.inAppMessaging()getInAppMessaging()
Default export inAppMessaging()getInAppMessaging()
FirebaseInAppMessagingTypesImport InAppMessaging and helpers (setMessagesDisplaySuppressed, etc.) from root
Instance-only usage without modular helpersPrefer free functions: setMessagesDisplaySuppressed(inAppMessaging, enabled), etc.

Example: suppressing messages during setup

js
// Previously (removed)
import firebase from '@react-native-firebase/app';
import inAppMessaging from '@react-native-firebase/in-app-messaging';

await firebase.inAppMessaging().setMessagesDisplaySuppressed(true);
// or
await inAppMessaging().setMessagesDisplaySuppressed(true);
js
// Now
import {
  getInAppMessaging,
  setMessagesDisplaySuppressed,
} from '@react-native-firebase/in-app-messaging';

await setMessagesDisplaySuppressed(getInAppMessaging(), true);

See In-App Messaging usage for additional examples.

Installations

The namespaced API for @react-native-firebase/installations has been removed. This package is modular-only — use getInstallations() and the root-level helper functions.

Modular getInstallations() returns a firebase-js-sdk-shaped Installations object exposing only app. Use modular helper functions instead of instance methods.

Removed namespaced API

RemovedReplacement (modular)
firebase.installations()getInstallations()
Default export installations()getInstallations()
FirebaseInstallationsTypesImport Installations and helpers (getId, getToken, deleteInstallations) from root
installations.getId() / .getToken() / .delete()getId(installations), getToken(installations), deleteInstallations(installations)

Breaking changes (modular call shape)

BeforeNow
installations.getId()getId(installations)
installations.getToken()getToken(installations)
installations.delete()deleteInstallations(installations) — argument is required

Example

js
// Previously (removed)
import firebase from '@react-native-firebase/app';
import installations from '@react-native-firebase/installations';

const id = await firebase.installations().getId();
// or
const id = await installations().getId();
js
// Now
import { getInstallations, getId } from '@react-native-firebase/installations';

const installations = getInstallations();
const id = await getId(installations);

See Installations usage for additional examples.

Cloud Messaging

The namespaced API for @react-native-firebase/messaging has been removed. This package is modular-only — use getMessaging() and the root-level helper functions.

Modular getMessaging() returns a firebase-js-sdk-shaped Messaging object. Prefer free functions (getToken(messaging), onMessage(messaging, listener), etc.) over calling methods on the service instance.

Removed namespaced API

RemovedReplacement (modular)
firebase.messaging()getMessaging()
Default export messaging()getMessaging()
FirebaseMessagingTypesImport Messaging, RemoteMessage, and helpers from package root
messaging.getToken() / .onMessage() / etc.getToken(messaging), onMessage(messaging, listener), etc.
messaging.setDeliveryMetricsExportToBigQuery()experimentalSetDeliveryMetricsExportedToBigQueryEnabled(messaging, enabled)
firebase.messaging.SDK_VERSION / messaging.SDK_VERSIONSDK_VERSION top-level export from package root

Example: foreground messages

js
// Previously (removed)
import firebase from '@react-native-firebase/app';
import messaging from '@react-native-firebase/messaging';

firebase.messaging().onMessage(message => {
  console.log(message.data);
});
// or
messaging().onMessage(message => {
  console.log(message.data);
});
js
// Now
import { getMessaging, onMessage } from '@react-native-firebase/messaging';

onMessage(getMessaging(), message => {
  console.log(message.data);
});

Example: delivery metrics to BigQuery

js
// Previously (removed)
await firebase.messaging().setDeliveryMetricsExportToBigQuery(true);
js
// Now
import {
  getMessaging,
  experimentalSetDeliveryMetricsExportedToBigQueryEnabled,
} from '@react-native-firebase/messaging';

await experimentalSetDeliveryMetricsExportedToBigQueryEnabled(getMessaging(), true);

See Cloud Messaging usage for additional examples.

App Distribution

The namespaced API for @react-native-firebase/app-distribution has been removed. This package is modular-only — use getAppDistribution() and the root-level helper functions.

Removed namespaced API

RemovedReplacement (modular)
firebase.appDistribution()getAppDistribution()
Default export appDistribution()getAppDistribution()
FirebaseAppDistributionTypesImport AppDistribution, AppDistributionRelease from package root
appDistribution.isTesterSignedIn() / etc.isTesterSignedIn(appDistribution), signInTester(appDistribution), checkForUpdate(appDistribution), signOutTester(appDistribution)
firebase.appDistribution.SDK_VERSIONSDK_VERSION top-level export from package root

Example

js
// Previously (removed)
import firebase from '@react-native-firebase/app';
import appDistribution from '@react-native-firebase/app-distribution';

await firebase.appDistribution().isTesterSignedIn();
js
// Now
import { getAppDistribution, isTesterSignedIn } from '@react-native-firebase/app-distribution';

const appDistribution = getAppDistribution();
await isTesterSignedIn(appDistribution);

Cloud Functions

The namespaced API for @react-native-firebase/functions has been removed. This package is modular-only — use getFunctions() and root-level helper functions.

Removed namespaced API

RemovedReplacement (modular)
firebase.functions()getFunctions() or getFunctions(app, regionOrCustomDomain)
Default export functions()getFunctions()
FirebaseFunctionsTypesImport Functions, HttpsCallable, HttpsErrorCode, etc. from package root
functions().httpsCallable()httpsCallable(functions, name, options?)
functions().useEmulator()connectFunctionsEmulator(functions, host, port)

Example

js
// Previously (removed)
import firebase from '@react-native-firebase/app';
import functions from '@react-native-firebase/functions';

await firebase.functions().httpsCallable('myFn')({ foo: 'bar' });
js
// Now
import { getFunctions, httpsCallable } from '@react-native-firebase/functions';

const functions = getFunctions();
await httpsCallable(functions, 'myFn')({ foo: 'bar' });

Performance Monitoring

The namespaced API for @react-native-firebase/perf has been removed. This package is modular-only — use getPerformance() and root-level helper functions.

Removed namespaced API

RemovedReplacement (modular)
firebase.perf()getPerformance()
Default export perf()getPerformance()
FirebasePerformanceTypesImport FirebasePerformance, PerformanceTrace, etc. from package root
perf().newTrace()trace(performance, name)
perf().newHttpMetric()httpMetric(performance, url, httpMethod)

Signature changes

  • Trace, HttpMetric, and ScreenTrace start() / stop() now return void synchronously (previously Promise<null>), matching the firebase-js-sdk web PerformanceTrace. The underlying native calls are in-memory, so no await is required — remove any await on these calls.
  • startScreenTrace(performance, screenName) and the internal startTrace(name) helper now return the trace instance synchronously instead of a Promise.

App Check

The namespaced API for @react-native-firebase/app-check has been removed. This package is modular-only — use getAppCheck() / initializeAppCheck() and root-level helper functions.

Removed namespaced API

RemovedReplacement (modular)
firebase.appCheck()getAppCheck() or initializeAppCheck(app, options)
Default export appCheck()getAppCheck()
FirebaseAppCheckTypesImport AppCheck, AppCheckTokenResult, etc. from package root
appCheck().getToken()getToken(appCheck, forceRefresh?)

Signature changes

  • initializeAppCheck(app?, options?) returns AppCheck synchronously (previously Promise<AppCheck>). Native provider setup continues in the background — remove await and do not chain .then().

Analytics

The namespaced API for @react-native-firebase/analytics has been removed. This package is modular-only — use getAnalytics() and root-level helper functions.

Analytics supports only the default Firebase app (same as before). Calling getAnalytics(secondaryApp) throws.

Removed namespaced API

RemovedReplacement (modular)
firebase.analytics()getAnalytics()
Default export analytics()getAnalytics()
FirebaseAnalyticsTypesImport Analytics, event parameter types, etc. from package root
analytics().logEvent(...)logEvent(analytics, ...)
analytics().setUserId(...) etc.setUserId(analytics, ...), setConsent(analytics, ...), etc.
Deprecated helper events (logScreenView, logPurchase, …)Still exported as modular helpers; prefer logEvent(analytics, 'screen_view', params)

Signature changes

  • logEvent(analytics, …) returns void synchronously (previously Promise<void>). Remove await and .then() chains.

Example

js
// Previously (removed)
import firebase from '@react-native-firebase/app';
import analytics from '@react-native-firebase/analytics';

await firebase.analytics().logEvent('screen_view', { screen_name: 'Home' });
await analytics().setUserId('user-123');
js
// Now
import { getAnalytics, logEvent, setUserId } from '@react-native-firebase/analytics';

const analytics = getAnalytics();
logEvent(analytics, 'screen_view', { screen_name: 'Home' });
await setUserId(analytics, 'user-123');

See Analytics usage for additional examples.

Remote Config

The namespaced API for @react-native-firebase/remote-config has been removed. This package is modular-only — use getRemoteConfig() and root-level helper functions.

Modular getRemoteConfig() returns a firebase-js-sdk-shaped RemoteConfig object with app, settings, defaultConfig, fetchTimeMillis, and lastFetchStatus. Use modular helper functions for fetch/activate/getters; assign remoteConfig.settings and remoteConfig.defaultConfig instead of removed modular setConfigSettings() / setDefaults() helpers.

Removed namespaced API

RemovedReplacement (modular)
firebase.remoteConfig()getRemoteConfig()
Default export remoteConfig()getRemoteConfig()
FirebaseRemoteConfigTypesImport RemoteConfig, Value, etc. from package root
remoteConfig().activate() etc.activate(remoteConfig), fetchConfig(remoteConfig), getValue(remoteConfig, key), etc.
remoteConfig.LastFetchStatus / .ValueSource on namespaceLastFetchStatus, ValueSource named exports

Breaking changes (modular call shape)

BeforeNow
remoteConfig().fetch()fetchConfig(remoteConfig)
remoteConfig().setConfigSettings({ ... })remoteConfig.settings = { ... }
remoteConfig().setDefaults({ ... })remoteConfig.defaultConfig = { ... }
remoteConfig().onConfigUpdated(listener)onConfigUpdate(remoteConfig, observer)

Example

js
// Previously (removed)
import firebase from '@react-native-firebase/app';
import remoteConfig from '@react-native-firebase/remote-config';

await firebase.remoteConfig().fetchAndActivate();
const value = firebase.remoteConfig().getValue('key').asString();
js
// Now
import { getRemoteConfig, fetchAndActivate, getValue } from '@react-native-firebase/remote-config';

const remoteConfig = getRemoteConfig();
await fetchAndActivate(remoteConfig);
const value = getValue(remoteConfig, 'key').asString();

See Remote Config usage for additional examples.

Crashlytics

The namespaced API for @react-native-firebase/crashlytics has been removed. This package is modular-only — use getCrashlytics() and root-level helper functions.

Removed namespaced API

RemovedReplacement (modular)
firebase.crashlytics()getCrashlytics()
Default export crashlytics()getCrashlytics()
FirebaseCrashlyticsTypesImport Crashlytics from package root
crashlytics().log()log(crashlytics, message)
crashlytics().recordError()recordError(crashlytics, error, jsErrorName?)

Realtime Database

The namespaced API for @react-native-firebase/database has been removed. This package is modular-only — use getDatabase() and root-level helper functions.

Removed namespaced API

RemovedReplacement (modular)
firebase.database()getDatabase() or getDatabase(app, url?)
Default export database()getDatabase()
FirebaseDatabaseTypesImport Database, DatabaseReference, etc. from package root
database().ref()ref(database, path?)
database().refFromURL()refFromURL(database, url)

Signature changes

  • goOnline(db) and goOffline(db) (and the database instance methods) now return void synchronously (previously Promise<void>), matching firebase-js-sdk. Remove any await on these calls.

Cloud Storage

The namespaced API for @react-native-firebase/storage has been removed. This package is modular-only — use getStorage() and root-level helper functions.

Removed namespaced API

RemovedReplacement (modular)
firebase.storage()getStorage() or getStorage(app, bucketUrl?)
Default export storage()getStorage()
FirebaseStorageTypesImport FirebaseStorage, StorageReference, etc. from package root
storage().ref()ref(storage, path?)
storageRef.put()uploadBytesResumable(storageRef, data, metadata?)

Signature changes

  • UploadTask.pause(), UploadTask.resume(), and UploadTask.cancel() now return boolean synchronously (previously Promise<boolean>), matching firebase-js-sdk task semantics. Remove await, .then(), and .catch() from these control calls and use the returned boolean directly.
  • cancel() delegates to the native SDK. Android cancels active uploads; iOS active-upload cancel follows the current Firebase Storage iOS SDK 12.15.0 behavior tracked in firebase-ios-sdk#16353.

Authentication

The namespaced API for @react-native-firebase/auth has been removed. This package is modular-only — use getAuth() / initializeAuth() and root-level helper functions.

Removed namespaced API

RemovedReplacement (modular)
firebase.auth()getAuth() or getAuth(app)
Default export auth()getAuth()
FirebaseAuthTypes namespaceImport Auth, User, UserCredential, etc. from package root
auth().signInWithEmailAndPassword(...)signInWithEmailAndPassword(getAuth(), ...)
auth().useEmulator(url)connectAuthEmulator(getAuth(), url, options?)
firebase.auth.EmailAuthProviderEmailAuthProvider (named export)

Signature changes

  • isSignInWithEmailLink(auth, emailLink) now returns boolean synchronously, matching firebase-js-sdk.
  • TotpSecret.generateQrCodeUrl(accountName?, issuer?) now returns string synchronously, matching firebase-js-sdk. When accountName or issuer is omitted, React Native Firebase fills the same defaults from the current user email and Firebase app name.

Example

js
// Previously (removed)
import firebase from '@react-native-firebase/app';
import auth from '@react-native-firebase/auth';

firebase.auth().signOut();
auth().currentUser;
js
// Now
import { getAuth, signOut } from '@react-native-firebase/auth';

const auth = getAuth();
await signOut(auth);
auth.currentUser;

Cloud Firestore

The namespaced API for @react-native-firebase/firestore has been removed. This package is modular-only — use getFirestore() / initializeFirestore() and root-level helper functions. The @react-native-firebase/firestore/pipelines subpath export is unchanged.

Removed namespaced API

RemovedReplacement (modular)
firebase.firestore()getFirestore() or getFirestore(app, databaseId?)
Default export firestore()getFirestore()
FirebaseFirestoreTypes namespaceImport Firestore, DocumentReference, Query, etc. from package root
firestore().collection(...)collection(getFirestore(), ...)
firestore().doc(...)doc(getFirestore(), ...)
firestore().batch()writeBatch(getFirestore())
firestore().runTransaction(...)runTransaction(getFirestore(), updateFunction, options?)
firestore().useEmulator(...)connectFirestoreEmulator(getFirestore(), ...)
firestore().settings(...)initializeFirestore(app, settings, databaseId?)
firestore.FieldValue / firestore.TimestampFieldValue, Timestamp, FieldPath, Bytes, GeoPoint, Filter (named exports)
firestore.BlobBytes

Signature changes

  • initializeFirestore(app, settings, databaseId?) returns Firestore synchronously (previously Promise<Firestore>). Remove await and .then(); settings apply on the native bridge after return.
  • TransactionOptions is now exported. runTransaction(firestore, updateFunction, options?) accepts { maxAttempts?: number } and passes the retry limit to the native iOS and Android Firestore SDKs. When options is omitted, the native default applies (5 attempts, matching firebase-js-sdk runTransaction). When maxAttempts is provided explicitly, values below 1 throw synchronously with Max attempts must be at least 1 — the same validation as firebase-js-sdk.
  • aggregateFieldEqual() and aggregateQuerySnapshotEqual() are now exported for aggregate query equality checks (firebase-js-sdk parity).
  • FieldValue maximum(n) and minimum(n) sentinels from firebase-js-sdk 12.15.0 are not exported yet. Android Firebase Firestore SDK 34.15.0 supports them, but iOS Firebase Firestore SDK 12.15.0 does not expose matching FIRFieldValue factories, so React Native Firebase waits for cross-platform support.

Example

js
// Previously (removed)
import firebase from '@react-native-firebase/app';
import firestore from '@react-native-firebase/firestore';

firebase.firestore().collection('users').doc('alice').set({ name: 'Alice' });
firestore.FieldValue.serverTimestamp();
js
// Now
import {
  getFirestore,
  collection,
  doc,
  setDoc,
  serverTimestamp,
} from '@react-native-firebase/firestore';

const db = getFirestore();
await setDoc(doc(collection(db, 'users'), 'alice'), {
  name: 'Alice',
  createdAt: serverTimestamp(),
});

See Firestore usage for additional examples.

Automated migration checklist

Use this section when running scripted or agent-assisted upgrades to v26 for modular-only packages.

1. Upgrade dependencies

bash
# Bump all @react-native-firebase/* packages to v26 together (monorepo versions are aligned)
yarn add @react-native-firebase/app@^26.0.0
cd ios && pod install

2. Fix imports by package

For each modular-only package you use:

PackageSearch forReplace with
appdefault firebase import, firebase.app(), firebase.apps, firebase.initializeApp(), firebase.utils(), firebase.SDK_VERSIONgetApp(), getApps(), initializeApp(), getUtils(), FilePath, SDK_VERSION, setLogLevel, etc.
mlfirebase.ml(), default ml(), FirebaseMLTypesgetML(), root FirebaseML type
in-app-messagingfirebase.inAppMessaging(), default inAppMessaging(), FirebaseInAppMessagingTypesgetInAppMessaging(), root modular helpers (setMessagesDisplaySuppressed, etc.)
installationsfirebase.installations(), default installations(), .getId(), .getToken(), .delete(), FirebaseInstallationsTypesgetInstallations(), getId(), getToken(), deleteInstallations()
messagingfirebase.messaging(), default messaging(), FirebaseMessagingTypes, instance methodsgetMessaging(), root helpers (getToken, onMessage, etc.), SDK_VERSION, experimentalSetDeliveryMetricsExportedToBigQueryEnabled
app-distributionfirebase.appDistribution(), default appDistribution(), FirebaseAppDistributionTypes, instance methodsgetAppDistribution(), isTesterSignedIn, signInTester, checkForUpdate, signOutTester, SDK_VERSION
functionsfirebase.functions(), default functions(), FirebaseFunctionsTypes, instance methodsgetFunctions(), httpsCallable, httpsCallableFromUrl, connectFunctionsEmulator, HttpsErrorCode
perffirebase.perf(), default perf(), FirebasePerformanceTypes, instance methodsgetPerformance(), trace, httpMetric, newScreenTrace, startScreenTrace, initializePerformance
app-checkfirebase.appCheck(), default appCheck(), FirebaseAppCheckTypes, instance methodsgetAppCheck(), initializeAppCheck, getToken, getLimitedUseToken, setTokenAutoRefreshEnabled, onTokenChanged, CustomProvider
analyticsfirebase.analytics(), default analytics(), FirebaseAnalyticsTypes, instance methodsgetAnalytics(), logEvent, setUserId, setConsent, getAppInstanceId, getSessionId, etc.
remote-configfirebase.remoteConfig(), default remoteConfig(), FirebaseRemoteConfigTypes, instance methodsgetRemoteConfig(), activate, fetchConfig, fetchAndActivate, getValue, getAll, onConfigUpdate, LastFetchStatus, ValueSource
crashlyticsfirebase.crashlytics(), default crashlytics(), FirebaseCrashlyticsTypes, instance methodsgetCrashlytics(), log, recordError, setUserId, setAttribute, setAttributes, setCrashlyticsCollectionEnabled, etc.
databasefirebase.database(), default database(), FirebaseDatabaseTypes, instance methodsgetDatabase(), ref, refFromURL, onValue, runTransaction, connectDatabaseEmulator, etc.
storagefirebase.storage(), default storage(), FirebaseStorageTypes, instance/reference methodsgetStorage(), ref, uploadBytesResumable, getDownloadURL, connectStorageEmulator, StringFormat, TaskEvent, TaskState
firestorefirebase.firestore(), default firestore(), FirebaseFirestoreTypes, instance methodsgetFirestore(), doc, collection, setDoc, writeBatch, runTransaction, connectFirestoreEmulator, FieldValue, Timestamp, Bytes, SDK_VERSION

Also remove await, .then(), and .catch() from UploadTask.pause(), UploadTask.resume(), and UploadTask.cancel(). For Firestore transactions, import TransactionOptions when you pass { maxAttempts } (omit options for the default 5 retries; do not pass 0 or negative values). Import aggregateFieldEqual() / aggregateQuerySnapshotEqual() for aggregate equality checks.

3. Validate

bash
yarn compile
yarn tests:jest packages/<pkg>/__tests__