Loading... Search articles

Search for articles

Sorry, but we couldn't find any matches...

But perhaps we can interest you in one of our more popular articles?
Publish Apps to Firebase App Distribution using codemagic.yaml

Publish Apps to Firebase App Distribution using codemagic.yaml

Jul 23, 2021

Written by Chris Raastad

Firebase is a suite of cloud-based services by Google to simplify mobile app development and management. Firebase 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 and React Native to publish QA builds to one place for both platforms.

This guide will show you how to easily distribute Android and iOS builds to tester groups in Firebase App Distribution using a codemagic.yaml build configuration file. An example codemagic.yaml file for a Flutter application can be found in the Codemagic sample projects. The example file is for a Flutter app, but the same publishing logic can be applied to any artifacts created with any mobile app framework.

Prerequisites

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

  • A mobile app project that you want to distribute in Firebase App Distribution

  • Access to your project in the Firebase console (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. See these instructions for finding your device’s UDID.

How to set up Firebase App Distribution with codemagic.yaml

Follow the steps of Use the CLI with CI systems to generate a Firebase token.

If you’re new to Codemagic, you should create a new project and follow the steps to set up a Flutter, React Native, Ionic, iOS, or Android app using codemagic.yaml. 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 for a detailed description of iOS code signing.

In your codemagic.yaml workflow configuration, you should add a firebase section in the publishing section like so:

workflows:
  publish-ios-and-android-to-firebase-app-distribution:
    ...
    publishing:
      firebase:
        firebase_token: Encrypted(...)
        android:
          app_id: x:xxxxxxxxxxxx:android:xxxxxxxxxxxxxxxxxxxxxx
          groups: 
            - android-testers
        ios:
          app_id: x:xxxxxxxxxxxx:ios:xxxxxxxxxxxxxxxxxxxxxx
          groups:
            - ios-testers

Here you should provide your encrypted Firebase 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.

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

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

Latest articles

Show more posts