10. Signing, Building & Publishing the Apps
The User App, Restaurant App and Delivery Man / Driver App are published as three independent listings on each store, so this section runs three times — once per app. You can sign all three with the same keystore; only the package name, the store listing and the artwork differ.
10.1. Create a release keystore
Android release builds must be signed with your own keystore. Create it once and keep it safe — if you lose it you cannot update the app on Google Play./p>
keytool -genkey -v -keystore ~/my-release-key.jks -keyalg RSA \ -keysize 2048 -validity 10000 -alias my-key-alias
-keystore— where the.jksfile is written.-keyalg RSA,-keysize 2048— the signing algorithm and key length.-validity 10000— validity in days (about 27 years).-alias— the name of the key inside the keystore.
You are prompted for a keystore password, a key password and your organisation details.
10.2. Reference the keystore from the project
Create android/key.properties (never commit this file):
storePassword=your-store-password keyPassword=your-key-password keyAlias=my-key-alias storeFile=/Users/yourusername/my-release-key.jks
Gradle reads this file at build time, so the keystore password never lives in the tracked sources. Add android/key.properties and the .jks file itself to .gitignore.
10.3. Build a release version
# Android App Bundle (required by Google Play) flutter build appbundle --release # Android APK (for direct distribution / testing) flutter build apk --release # iOS (macOS only) flutter build ipa --release
Outputs are written to build/app/outputs/ (Android) and build/ios/ipa/ (iOS).
10.4. Publish to Google Play
- Create a developer account at the Google Play Console.
- Create three apps — one each for the User, Restaurant and Driver app — and complete each store listing (title, description, screenshots, feature graphic, icon) plus its Data Safety, Content Rating and Privacy Policy sections.
- Upload the
.aabto a Production (or Internal Testing) release. - Increment
version:inpubspec.yamlfor every new upload — Play rejects duplicate version codes. - Submit for review.
10.5. Publish to the Apple App Store
- Enrol in the
Apple Developer Program. - Create the App ID and the app record in App Store Connect.
- In Xcode set the team and signing certificates, then Product → Archive and upload with the Organizer (or upload the
.ipawith Transporter). - Complete the listing, privacy details and App Review information, then submit for review.
Note: Apple requires Sign in with Apple on any iOS app that offers third-party sign-in such as Google. Enable the Apple provider in Firebase Authentication and add the capability in Xcode before submitting.
