Firebase for the apps
The apps ship with placeholder Firebase settings. Connect all three to the same Firebase project your server uses (Firebase). Set your app IDs first (Rename & rebrand).
1. Install the tools (once)
Section titled “1. Install the tools (once)”npm install -g firebase-toolsfirebase logindart pub global activate flutterfire_cli2. Connect each app
Section titled “2. Connect each app”- In the app’s folder:
Terminal window cd apps/customerflutterfire configure --project=your-firebase-project-id - When asked which platforms, choose android and ios. FlutterFire reads your app IDs,
registers the apps in Firebase, and writes:
lib/firebase_options.dartandroid/app/google-services.jsonios/Runner/GoogleService-Info.plist
- Repeat in
apps/sellerandapps/delivery.
3. Turn on what the apps use
Section titled “3. Turn on what the apps use”In the Firebase console for your project:
- Authentication → Sign-in method: Phone, Google, and Apple if you offer it.
- Cloud Messaging: on by default; iOS needs your APNs key — see Push notifications.
- Crashlytics (customer app, optional): open it once so crash reports start arriving.
4. iOS: Google and phone sign-in
Section titled “4. iOS: Google and phone sign-in”Each app’s ios/Runner/Info.plist has placeholders FlutterFire doesn’t fill. Open the app’s new
GoogleService-Info.plist and copy:
In Info.plist | Replace with |
|---|---|
GIDClientID → YOUR_IOS_CLIENT_ID.apps.googleusercontent.com | its CLIENT_ID |
URL scheme com.googleusercontent.apps.YOUR_IOS_CLIENT_ID | its REVERSED_CLIENT_ID |
URL scheme app-1-000000000000-ios-0000000000000000000000 | your iOS app’s Encoded App ID (Firebase console → Project settings → your iOS app) |
5. Android: phone sign-in fingerprints
Section titled “5. Android: phone sign-in fingerprints”Phone and Google sign-in on Android need your signing key’s fingerprints in Firebase:
- Print them (debug key, and later your release key):
Terminal window cd android./gradlew signingReport - Firebase console → Project settings → your Android app → Add fingerprint → paste the SHA-1 and SHA-256. Add both the debug and release ones.
- Download the updated
google-services.jsonand replaceandroid/app/google-services.json.