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:
- 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 native app values you are building.
2. Replace the App Files
Common locations:
| Platform | File | Common location |
|---|---|---|
| iOS | GoogleService-Info.plist | ios/<AppName>/GoogleService-Info.plist |
| Android | google-services.json | android/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 ..
yarn ios
# or
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
| Problem | Fix |
|---|---|
| App still reads demo data | Replace the config file in the active target and rebuild. |
| iOS works but Android fails | Check google-services.json and Android applicationId. |
| Android works but iOS fails | Check GoogleService-Info.plist and iOS bundle identifier. |
| Sign-up fails | Enable the required Firebase Auth provider. |
| Data screens are empty | Enable Firestore and import required seed data. |