Documentation Index
Fetch the complete documentation index at: https://docs.mobile-starter.amisi.ai/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Google account
- Completed App Identity configuration
- Bundle identifiers finalized (cannot change after setup)
Create Firebase Project
- Go to Firebase Console
- Click Add project or Create a project
- Enter your project name (e.g., “My App”)
-
Configure Google Analytics (recommended):
- Enable Google Analytics
- Select or create an Analytics account
- Accept terms and conditions
- Click Create project
- Wait for project creation to complete
Add iOS App to Firebase
1. Register iOS App
- In Firebase Console, click the iOS icon or Add app
-
Enter your iOS bundle ID:
- Must match
ios.bundleIdentifierinapp.json - Example:
com.yourcompany.yourapp
- Must match
- Enter app nickname (optional): “My App iOS”
- Enter App Store ID (optional, can add later)
- Click Register app
2. Download Config File
-
Download
GoogleService-Info.plist -
Save it to your project:
-
Important: Add to
.gitignoreif it contains sensitive data:
3. Verify Configuration
Ensureapp.json references the file:
4. Skip SDK Installation
Click Next through the SDK installation steps - React Native Firebase is already configured in the starter.Add Android App to Firebase
1. Register Android App
- In Firebase Console, click the Android icon or Add app
-
Enter your Android package name:
- Must match
android.packageinapp.json - Example:
com.yourcompany.yourapp
- Must match
- Enter app nickname (optional): “My App Android”
- Enter SHA-1 signing certificate (optional for now)
- Click Register app
2. Download Config File
-
Download
google-services.json -
Save it to your project:
-
Important: Add to
.gitignoreif it contains sensitive data:
3. Verify Configuration
Ensureapp.json references the file:
4. Skip SDK Installation
Click Next through the SDK installation steps - React Native Firebase is already configured.Enable Firebase Services
Firebase Analytics
Analytics is enabled by default. To verify:- In Firebase Console, go to Analytics → Dashboard
- You should see “Analytics is enabled”
Firebase Crashlytics
- In Firebase Console, go to Crashlytics
- Click Enable Crashlytics
- Follow the setup wizard
Firebase Authentication
- In Firebase Console, go to Authentication
- Click Get started
- Enable sign-in methods you want to use:
- Email/Password: For email-based authentication
- Google: For Google Sign-In
- Apple: For Sign in with Apple (required for iOS)
- Anonymous: For anonymous authentication
Configure Environment Variables
Add Firebase configuration to your.env file:
- Go to Project Settings (gear icon)
- Scroll to Your apps
- Select your iOS or Android app
- Copy the configuration values
Enable Firebase Adapter
Updateamisi.config.json to use Firebase adapters:
packages/config/src/flags.ts:
Test Firebase Integration
1. Rebuild Native Projects
Firebase requires native configuration:2. Run the App
3. Verify Analytics
- Navigate through your app
- In Firebase Console, go to Analytics → DebugView
- Enable debug mode on your device:
- You should see events in DebugView within a few minutes
4. Verify Crashlytics
- Trigger a test crash in your app
- In Firebase Console, go to Crashlytics
- You should see the crash report within a few minutes
5. Verify Authentication
- Try signing in with your configured method
- In Firebase Console, go to Authentication → Users
- You should see the new user
Production Setup
iOS App Store
For production iOS builds:-
Add App Store ID to Firebase:
- Go to Firebase Console → Project Settings
- Under iOS apps, add your App Store ID
-
Configure App Store Connect:
- Ensure bundle ID matches Firebase configuration
- Add GoogleService-Info.plist to your Xcode project (done automatically by prebuild)
Android Play Store
For production Android builds:-
Add SHA-1 certificate:
-
Add to Firebase:
- Go to Firebase Console → Project Settings
- Under Android apps, add SHA-1 fingerprint
-
Configure Play Store:
- Ensure package name matches Firebase configuration
- Upload google-services.json with your build
Security Best Practices
1. Restrict API Keys
In Firebase Console:- Go to Google Cloud Console → APIs & Services → Credentials
- Find your API keys
- Add restrictions:
- iOS: Restrict to iOS bundle ID
- Android: Restrict to Android package name and SHA-1
2. Configure App Check
Enable App Check for additional security:- In Firebase Console, go to App Check
- Register your apps
- Configure attestation providers
3. Set Security Rules
Configure Firestore and Storage security rules:- Go to Firestore Database → Rules
- Set appropriate read/write rules
- Never use
allow read, write: if true;in production
Troubleshooting
”No Firebase App ‘[DEFAULT]’ has been created”
Solution: Ensure config files are in the correct location and rebuild:Analytics Events Not Appearing
Possible causes:- Debug mode not enabled
- Events take time to appear (up to 24 hours in production)
- Invalid event names or parameters
Authentication Fails
Possible causes:- Sign-in method not enabled in Firebase Console
- Bundle ID / package name mismatch
- Environment variables not set
Crashlytics Not Reporting
Possible causes:- Crashlytics not enabled in Firebase Console
- App not properly configured
- Debug builds don’t always report crashes
Official Documentation
- Firebase Console
- Firebase iOS Setup
- Firebase Android Setup
- Firebase Analytics
- Firebase Crashlytics
- Firebase Authentication
- React Native Firebase