Go4Food Go4Food Docs v1.0.0
Step 2 · Connect the Apps

Change the Package Name

Give each phone app your own package name (Android) and bundle ID (iOS) before you connect Firebase and publish.

10 min per app

Google Play, the App Store and Firebase know each app by its package name. Pick your own, for example:

AppFolderNowYours, for example
Customercustomer/com.go4food.usercom.yourbrand.customer
Restaurantrestaurant/com.go4food.vendorcom.yourbrand.restaurant
Driverdriver/com.go4food.ridercom.yourbrand.driver

The admin panel, the restaurant web panel and the customer website run in the browser and have no package name. Skip them on this page.

It can never change after you publish

Once an app is live on Google Play or the App Store, its package name is fixed. Choose carefully, and use a different one for each app. Use only lowercase letters, numbers, dots and underscores.

Android#

Open android/app/build.gradle.kts in the app folder and change one line:

customer/android/app/build.gradle.kts
defaultConfig {
    applicationId = "com.yourbrand.customer"
    ...
}

That is all Google Play and Firebase need.

Optional: also change the namespace#

The same file has namespace = "com.go4food.user" (or .vendor, .rider). Users never see it, so you can leave it. To change it, change these together, or the app crashes on start:

  • namespace = "com.yourbrand.customer" in android/app/build.gradle.kts.
  • Move MainActivity.kt from android/app/src/main/kotlin/com/go4food/user/ to .../com/yourbrand/customer/ (restaurant: com/go4food/vendor/, driver: com/go4food/rider/).
  • Change the first line of MainActivity.kt to package com.yourbrand.customer. Change nothing else in that file.
  • Driver app only: android/app/src/main/AndroidManifest.xml also has package="com.go4food.rider" on its first tag. Change it to the same value.

iOS#

  1. Open ios/Runner.xcworkspace in Xcode.
  2. Click Runner → target Runner → Signing & Capabilities.
  3. Set Bundle Identifier to your own (check the All tab so Debug, Release and Profile change).
  4. Select the RunnerTests target and set the same ID with .RunnerTests at the end.

In ios/Runner.xcodeproj/project.pbxproj, replace every PRODUCT_BUNDLE_IDENTIFIER = com.go4food.user with your own ID (three lines for Runner, three for RunnerTests, which end in .RunnerTests). Use com.go4food.vendor in the restaurant app and com.go4food.rider in the driver app.

ios/Runner/Info.plist reads the ID from this setting, so you do not change it there.

Do not change the Dart package name

The name: line in pubspec.yaml (customer, restaurant, driver) is used in every import in the code. Users never see it. Leave it as it is.

Old Firebase files still name the demo package

google-services.json, GoogleService-Info.plist and lib/firebase_options.dart still contain com.go4food… and the demo project. Do not edit them by hand: FlutterFire replaces all three on the next page.

Next

Now connect each app to your Firebase project with FlutterFire. If you change a package name after that, run FlutterFire again for that app.