How to make flutter app distribution for testing in Firebase

keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key 
Image for post
Image for post

Create the key properties for Android to read the keystore. Please be noted you’d better ignore this key.properties file in .gitignore to not push it onto GitHub.

storePassword=*
keyPassword=*
keyAlias=key
storeFile=/Users/Frankie/geofencing-key.jks

Go to Flutter docs here to configure signing in gradle for Android.

Image for post
Image for post
Image for post
Image for post
  • Update the version section in the “pubspec.yaml” if needed.
  • Build the release apk package for Android.
# APK
flutter build apk --release
# App bundle (preferred)
flutter build appbundle --release
Image for post
Image for post

Build the release app package for iOS, then open xcode -> Product -> Archive -> Distribute App -> Ad Hoc -> Export to get actual .ipa file. (Remember to update the xcode-Runner-General-Version first)

flutter build ios --release

Go to App Distribution in Firebase and drag Android apk file/iOS ipa file into related apps.

Image for post
Image for post

Add testers’ email and notes and submit. Testers will receive the app install email.

Image for post
Image for post
Image for post
Image for post

Make sure you have an App ID registered with your app bundler id in your apple developer settings for this apple

Image for post
Image for post

Create an App in your Apple Connect.

Image for post
Image for post

Now you will have a lot of information to input for the iOS app.

For Android you should also create an App in Google Play Console.

Image for post
Image for post
Image for post
Image for post

We may probably need to configure the SH1 of the app in google cloud console if we use cloud services like google map services. Please be noted there is 1 SH1 for iOS app, and for Android app there is 1 debug SH1 and 1 release SH1 as well as 1 SH1 in Google Play Console.

#Check the release keystore (For iOS and Android release app)
keytool -list -v -keystore ~/geofencing-key.jks

#Check the debug keystore (For Android debug app)
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore -list -v
Image for post
Image for post

Written by

Researcher | Architect | Full-Stack | @hustakin

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store