Publish Flutter Apps to Firebase App Distribution
Tags: firebase, flutter, mobile, devops
Published: 2022-01-19 14:42:49

[Firebase](https://firebase.google.com/) is a suite of cloud-based services by Google to simplify mobile app development and management. [Firebase App Distribution](https://firebase.google.com/docs/app-distribution) allows app developers to distribute both Android and iOS builds to QA testers in one platform. This makes it ideal for cross-platform frameworks like [Flutter](http://flutter.dev/) to keep QA builds in one place for both platforms.

This guide will show you how to easily distribute Android and iOS builds of your Flutter app to tester groups in Firebase App Distribution.

## Prerequisites

In order to follow this guide, you will need the following:

* A **Flutter** project that you want to distribute to QA in Firebase
  
* Access to your project in the [Firebase console](https://console.firebase.google.com/) (create a new one if it doesn't exist)

* One app added for iOS and one app added for Android to your Firebase app distribution project (create new ones if they don't exist)

* A tester group created for each group of app testers (you can create them in Firebase console App Distribution Testers & Groups section)

* For each iOS device you would like to install your build, you will need to add the device UDID to Apple Developer Portal [devices](https://developer.apple.com/account/resources/devices). See these [instructions](https://bjango.com/help/iphoneudid/) for finding your device's UDID.

## How to set up Firebase App Distribution with Codemagic

> Here's a [video with the tutorial](https://www.youtube.com/watch?v=H_BRjgi6W24). 

Follow the steps of [Use the CLI with CI systems](https://firebase.google.com/docs/cli#cli-ci-systems) to generate a Firebase token.

If you're new to Codemagic, follow the steps of [Flutter Continuous Integration & Delivery (CI/CD) with Codemagic](https://blog.codemagic.io/getting-started-with-codemagic/) to set up a new Flutter project with the workflow editor to build an Android and/or iOS app. You can build Android in debug or release mode. You must build iOS in release mode with Manual or Automatic code signing with the Development or Ad Hoc Provisioning Profile type in order to install a build published to Firebase App Distribution. See our [docs](https://docs.codemagic.io/code-signing/ios-code-signing/) more info on iOS code signing.

For your workflow, in the **Distribution** section, select *Firebase App Distribution*. Here you should provide your token and for each app a Firebase app id and tester group alias(es). App id can be found in the Firebase App Distribution project settings. Tester group alias(es) can be found in the App Distribution Testers & Groups section.

![](https://blog.codemagic.io/uploads/2021/07/workflow-editor-firebase-app-distribution.png)

That's it! After a successful build, you'll see your iOS or Android build in the Firebase console App Distribution section. 

![](https://blog.codemagic.io/uploads/2021/08/firebase-app-distribution-android-testers.png)

![](https://blog.codemagic.io/uploads/2021/08/firebase-app-distribution-ios-testers.png)

And an email will go out to your testers with a link to download and install the build on their device.

![](https://blog.codemagic.io/uploads/2021/08/firebase-app-distribution-android-email.png)

![](https://blog.codemagic.io/uploads/2021/08/firebase-app-distribution-ios-email.png)