@react-native-firebase/appinstalled (and any other@react-native-firebase/*packages you use). Complete Getting Started soGoogleService-Info.plist/ ExpogoogleServicesFileandFirebaseApp.configure()(React Native CLI) are in place.- React Native 0.75 or newer (
spm_dependency). - Xcode
>= 26.2when using firebase-ios-sdk12.12.0or newer (v27 pins firebase-ios-sdk13.1.1). - Expo projects: use config plugins (
expo-build-properties,@react-native-firebase/app); do not hand-edit a generatedios/Podfileif Expo regenerates it on prebuild.
React Native Firebase resolves its Firebase Apple SDK dependencies with Swift Package Manager (SPM). This changes only how the native Firebase SDK is installed; your JavaScript and native application code do not change.
Firebase Apple SDK 13.0.0 and later are no longer distributed through CocoaPods. The last CocoaPods release is 12.19.3. See Google's CocoaPods deprecation guide.
- React Native 0.75 or newer is required (
spm_dependency). - v27 is SPM-only. SPM is the only supported Firebase install path.
$RNFirebaseDisableSPM = trueand Expoios.disableSPM: truefailpod install/ prebuild. They do not install CocoaPods Firebase 13 pods.- SPM requires CocoaPods 1.10 or newer for the React Native pod integration. React Native 0.75+ templates already satisfy this requirement.
- SPM pins the Firebase iOS SDK to the exact version in
sdkVersions.ios.firebasein@react-native-firebase/app(currently 13.1.1).
SPM requires dynamic framework linkage. Edit ios/Podfile before pod install:
# File: ios/Podfile. Top level, after prepare_react_native_project! and before the app target block. Required for SPM mode. Run pod install after editing.
use_frameworks! :linkage => :dynamicDo not use RNFB's SPM mode with use_frameworks! :linkage => :static.
A Podfile with no use_frameworks! line (or use_frameworks! false) is static
linkage too — that is the stock React Native / bare Expo default.
firebase-ios-sdk SPM products are automatic libraries (plain .library(...),
not type: .dynamic), so each pod that depends on them embeds its own copy.
With static pod linkage those copies collide at link time as duplicate-symbol
errors. pod install fails fast for that combination instead of surfacing the
linker failure later. Dynamic linkage is required for SPM mode to build and
run; see Sharing FirebaseCore with other native pods
for what dynamic linkage does and does not give you.
Firebase Apple SDK 13 depends on App Check 12. GoogleSignIn and Firebase 13 in the same app can fail App Check resolution until GoogleSignIn (and any React Native wrapper that pins it) allow App Check 12. The SPM and CocoaPods paths are separate:
- SPM: Tagged GoogleSignIn 10.0.0 still declares App Check
from: "11.0.0"(11.x). google/GoogleSignIn-iOS #626 (merged on main) widens the SPM App Check range to11.0.0 ..< 13.0.0. That change is not in a tagged release yet. An SPM resolve can succeed only after a GoogleSignIn tag that includes #626 (or an equivalent App Check 12-capable SPM range). - CocoaPods: The GoogleSignIn podspec on main and in 10.0.0 still
declares
AppCheckCore ~> 11.0. #626 did not change the CocoaPods dependency. CocoaPods graphs that pull GoogleSignIn alongside Firebase 13 stay blocked until a podspec bump allows App Check 12 and@react-native-google-signin/google-signin(or your Podfile pin) picks up that release.
Track GoogleSignIn-iOS releases and the React Native Google Sign-In package for both paths. SPM progress alone does not unblock CocoaPods consumers.
Expo projects must select dynamic linkage with
expo-build-properties.
Write this into app.json / app.config.js before npx expo prebuild:
// File: app.json (or app.config.js). Apply before npx expo prebuild. Sets iOS useFrameworks for SPM (dynamic).
{
"expo": {
"plugins": [
[
"expo-build-properties",
{
"ios": {
"useFrameworks": "dynamic"
}
}
]
]
}
}Do not pass disableSPM: true to the @react-native-firebase/app config
plugin. Firebase 13+ is SPM-only and that option fails prebuild.
The sections below describe editing ios/Podfile directly for React Native
CLI projects. Do not follow Podfile edits in an Expo project -- Expo
regenerates ios/Podfile from your config plugins on every prebuild, so a
direct edit does not persist. Use expo-build-properties instead, as shown
above.
For React Native 0.75 or newer, SPM is selected automatically. Configure dynamic
linkage in your ios/Podfile, then install pods:
# File: ios/Podfile. Top level, after prepare_react_native_project! and before the app target block. Step 1 of 2 for SPM (React Native CLI).
use_frameworks! :linkage => :dynamic# Project root / ios/. Step 2 of 2 for SPM (after Podfile use_frameworks! :linkage => :dynamic).
cd ios
pod installThe install output identifies the selected mode:
[react-native-firebase] RNFBApp: Using SPM for Firebase dependency resolution (products: FirebaseCore, FirebaseInstallations)RNFB also adds an [RNFB] Embed Firebase SPM Frameworks build phase to the app
target. This phase embeds Firebase frameworks built by SPM that React Native's
pod-level SPM integration does not otherwise copy into the app bundle.
RNFB automatically applies two build settings needed for SPM + dynamic
linkage, on every pod install/pod update:
-ObjCin the app target's linker flags and on RNFB pod targets, so Release's dead-code stripping does not drop Firebase'sFIRLibrary/FIRComponentregistration or Measurement Objective-C categories statically absorbed intoRNFBAnalytics.SWIFT_ENABLE_EXPLICIT_MODULES = 'NO'andCLANG_ENABLE_EXPLICIT_MODULES = 'NO'on both the app project and the Pods project, so Xcode 26's explicit Swift and Clang modules don't fail to resolve Firebase's internal-only SPM targets (FirebaseCoreInternal,FirebaseSharedSwift) or@imports of Firebase modules in your own Objective-C/Objective-C++ files. This does not disable SPM -- it makes Swift and Clang use implicit module discovery across the app, CocoaPods, and SPM build boundary.
You do not need to configure either of these yourself. If pod install warns
that they could not be applied automatically, or if Xcode still reports that a
Firebase module cannot be resolved, add the fallback in your existing
post_install block in ios/Podfile, after react_native_post_install, then
re-run pod install:
# File: ios/Podfile. Fallback only when pod install warns SPM build settings were not applied. Place after react_native_post_install, then pod install.
post_install do |installer|
react_native_post_install(
installer,
config[:reactNativePath],
# your existing options
)
rnfirebase_apply_spm_build_settings(installer)
endRNFB normally installs its SPM framework-embedding phase automatically after
CocoaPods has integrated [CP] Embed Pods Frameworks into the app target
(post_integrate). If pod install warns that automatic embedding could not
be configured, call the documented fallback from post_integrate in
ios/Podfile, then re-run pod install:
# File: ios/Podfile. Fallback only when pod install warns SPM embed phase was not configured. Then pod install.
post_integrate do |installer|
rnfirebase_add_spm_embed_phase(installer)
endDo not add the fallback unless the warning appears or the generated app target
does not contain [RNFB] Embed Firebase SPM Frameworks.
React Native attaches SPM products to each pod target via spm_dependency.
Because firebase-ios-sdk products are automatic libraries, each dynamic pod
framework that depends on Firebase embeds its own copy of FirebaseCore.
FirebaseApp.configure() in the app configures only the copy that target
links. Another pod's copy is never configured, so FirebaseApp.app() can
return nil there (and Auth can silently look signed-out even when RNFB JS
Auth has a user).
| RNFB | Other native dependency | Shared FirebaseCore? |
|---|---|---|
| SPM | SPM (spm_dependency) | No: each dynamic pod embeds its own copy |
| SPM | CocoaPods Firebase pods | No: dual resolution |
CocoaPods Firebase is no longer available for Firebase 13+. If a third-party
native module must share one configured FirebaseApp with RNFB, that module
must also resolve Firebase via SPM (same exact SDK version), not CocoaPods
trunk. Do not mix RNFB SPM with a third-party pod that still pulls Firebase
via CocoaPods. That is dual resolution and does not produce one shared
runtime.
Static pod linkage is not a sharing workaround under SPM: it fails at link
time with duplicate symbols (and pod install rejects the combination).
pod installfails with "Firebase Apple SDK is no longer distributed through CocoaPods": Remove$RNFirebaseDisableSPM = trueand Expoios.disableSPM. Useuse_frameworks! :linkage => :dynamicand React Native 0.75+.
pod installfails with "SPM + static linkage is not supported": Use dynamic linkage (use_frameworks! :linkage => :dynamic). A Podfile with nouse_frameworks!line (oruse_frameworks! false), the stock React Native / Expo default, is static linkage too.- With the stock template Podfile,
USE_FRAMEWORKS=dynamic pod installalso works, but it must be set for everypod install(including CI); the Podfile line is the durable fix. - Expo: set
ios.useFrameworksto"dynamic"in theexpo-build-propertiesplugin (see Expo projects), then re-runnpx expo prebuild. Only if you maintainios/by hand (no prebuild), set"ios.useFrameworks": "dynamic"inios/Podfile.properties.jsoninstead.
- With the stock template Podfile,
FirebaseApp.app()isnil/ Auth looks signed-out inside another native pod, or runtime logs duplicateFIRAppclasses: SPM mode cannot share oneFirebaseCoreacross dynamic pod frameworks. See Sharing FirebaseCore with other native pods.
- Google Sign-In / App Check SPM resolve failures: See Google Sign-In caveat.
FirebaseCoreInternal/FirebaseSharedSwiftcannot be resolved, or a Release/Archive build crashes at launch with a missing Firebase symbol: RNFB applies-ObjC,SWIFT_ENABLE_EXPLICIT_MODULES = 'NO', andCLANG_ENABLE_EXPLICIT_MODULES = 'NO'automatically; callrnfirebase_apply_spm_build_settings(installer)as a fallback only ifpod installwarns it could not do so.
- A Firebase framework is missing at app launch: Re-run
pod install, check for its automatic-embedding warning, and confirm the app target contains[RNFB] Embed Firebase SPM Frameworks. Use the fallback only when needed.
spm_dependencyis unavailable: Upgrade to React Native 0.75 or newer.
- SPM and CocoaPods both produce the same Firebase framework: Remove manually declared Firebase pods/packages so RNFB owns Firebase dependency resolution.
Archive fails with "…xcframework-ios.signature" (or
-ios-simulator.signature) "couldn't be copied … because an item with the
same name already exists": An Xcode Archive bug with SPM binary
xcframeworks (not an RNFB regression). RNFB adds a build phase that removes
these files; after upgrading, re-run pod install. If RNFB warns it couldn't
add the phase, add a Run Script phase on the app target:
# Only if archive fails with xcframework-*.signature copy conflict and RNFB
# could not apply its automatic workaround. Use the name from the error.
rm -f "${CONFIGURATION_BUILD_DIR}"/<NameFromTheErrorMessage>.xcframework-ios.signature
rm -f "${CONFIGURATION_BUILD_DIR}"/<NameFromTheErrorMessage>.xcframework-ios-simulator.signature
Core / App