Link Firebase Account to Your App

Add your Firebase config files to a React Native app so it connects to your own Firebase project.

Once you've created a Firebase project and registered the iOS and Android app entries, the app needs your native Firebase config files before it can talk to your project.

Quick Answer

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

1. Download Firebase Config Files

In Firebase Console:

  • open Project Settings;
  • under Your apps, select the iOS app and download GoogleService-Info.plist;
  • select the Android app and download google-services.json.

The iOS bundle identifier and Android application id in Firebase must match the values your app is built with.

2. Add the Files to the App

Standard locations:

| Platform | File | Location | | --- | --- | --- | | iOS | GoogleService-Info.plist | ios/<AppName>/GoogleService-Info.plist | | Android | google-services.json | android/app/google-services.json |

Paths can vary between projects. To find existing config files from the app root:

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

If your project already ships placeholder or sample config files, replace them with yours. On iOS, make sure the file is added to the active app target in Xcode simply copying it into the folder isn't always enough.

3. Update the JavaScript Firebase Config (if present)

Some projects also keep a JavaScript Firebase config for web SDK usage or backend helpers. Check before assuming it exists:

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

If you find a Firebase config object in the source, replace its values with the web app config from Firebase Console. If no web config exists yet, register a web app in the same Firebase project to generate one.

Public Firebase client config is not a secret it's designed to ship in the app bundle. Private service account keys, payment provider secret keys, and webhook secrets must stay on your backend and never in the app.

4. Rebuild the App

Native config changes require a rebuild, not just a Metro reload:

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

Do a clean rebuild if the app still behaves as though it's pointed at the old project.

Verification Checklist

  • the iOS file is present and added to the active iOS target;
  • the Android file is present in android/app;
  • bundle identifier and application id match Firebase;
  • the auth provider you're testing with is enabled;
  • a new test user appears in Firebase Console → Authentication → Users;
  • expected data appears in Firestore after a write.

Troubleshooting

| Problem | Fix | | --- | --- | | App still reads old or sample data | Confirm the config file is in the active target, then do a clean rebuild. | | iOS works but Android fails | Check google-services.json and the Android applicationId. | | Android works but iOS fails | Check GoogleService-Info.plist and the iOS bundle identifier. | | Sign-up fails | Enable the required Firebase Auth provider. | | Data screens are empty | Enable Firestore and add the data your screens query for. |

Next Steps