Skip to main content

Link Firebase Account to Your React Native App

After you create a Firebase project and add the iOS and Android app entries, you must replace the native Firebase config files in the app package.

Quick Answer

Download GoogleService-Info.plist for iOS and google-services.json for Android from your Firebase project, replace the files in the app, rebuild the app, then sign up with a test user and confirm the user appears in your Firebase project.

1. Download Firebase Config Files

In Firebase Console:

  1. Open Project Settings.
  2. Under Your apps, select the iOS app and download GoogleService-Info.plist.
  3. Select the Android app and download google-services.json.

The iOS bundle identifier and Android application id in Firebase must match the native app values you are building.

2. Replace the App Files

Common locations:

PlatformFileCommon location
iOSGoogleService-Info.plistios/<AppName>/GoogleService-Info.plist
Androidgoogle-services.jsonandroid/app/google-services.json

Exact paths can vary by package. Find the existing files from the app root:

find ios android -name "GoogleService-Info.plist" -o -name "google-services.json"

Replace the existing demo files with files from your Firebase project.

3. Update Optional JavaScript Firebase Config

Some apps include a JavaScript Firebase config for web SDK usage or backend helpers. Search the app before assuming the file exists:

find src -iname "*firebase*" -o -iname "*config*"

If the app has a Firebase config object under src/core or an app-specific config folder, replace the values with the web app config from Firebase Console. Create a Firebase web app in the same project if Firebase Console does not show web config values yet.

Public Firebase client config is not a secret. Private service account keys, Stripe secret keys, OpenAI keys, and webhook secrets must stay on the backend.

4. Rebuild the App

After replacing native config files:

cd ios
bundle exec pod install
cd ..
corepack yarn ios
# or
corepack yarn android

Use a clean rebuild if the app still appears connected to demo data.

Verification Checklist

  • iOS file is replaced in the active iOS target.
  • Android file is replaced in android/app.
  • Bundle identifier and Android application id match Firebase.
  • Firebase Auth provider used for testing is enabled.
  • A new test user appears in Firebase Console > Authentication > Users.
  • Expected data appears in Firestore after using a write flow.

Troubleshooting

ProblemFix
App still reads demo dataReplace the config file in the active target and rebuild.
iOS works but Android failsCheck google-services.json and Android applicationId.
Android works but iOS failsCheck GoogleService-Info.plist and iOS bundle identifier.
Sign-up failsEnable the required Firebase Auth provider.
Data screens are emptyEnable Firestore and import required seed data.

Next Steps

Documentation updates

Keep your build moving

Get important setup notes, new guides, and useful product updates without a noisy weekly newsletter.