Skip to content

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).

Terminal window
npm install -g firebase-tools
firebase login
dart pub global activate flutterfire_cli
  1. In the app’s folder:
    Terminal window
    cd apps/customer
    flutterfire configure --project=your-firebase-project-id
  2. When asked which platforms, choose android and ios. FlutterFire reads your app IDs, registers the apps in Firebase, and writes:
    • lib/firebase_options.dart
    • android/app/google-services.json
    • ios/Runner/GoogleService-Info.plist
  3. Repeat in apps/seller and apps/delivery.

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.

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.plistReplace with
GIDClientID → YOUR_IOS_CLIENT_ID.apps.googleusercontent.comits CLIENT_ID
URL scheme com.googleusercontent.apps.YOUR_IOS_CLIENT_IDits REVERSED_CLIENT_ID
URL scheme app-1-000000000000-ios-0000000000000000000000your iOS app’s Encoded App ID (Firebase console → Project settings → your iOS app)

Phone and Google sign-in on Android need your signing key’s fingerprints in Firebase:

  1. Print them (debug key, and later your release key):
    Terminal window
    cd android
    ./gradlew signingReport
  2. Firebase console → Project settings → your Android app → Add fingerprint → paste the SHA-1 and SHA-256. Add both the debug and release ones.
  3. Download the updated google-services.json and replace android/app/google-services.json.