Go to console

Distribute iOS apps to testers using fastlane

You can distribute builds to testers using fastlane, an open source platform that automates building and releasing iOS and Android apps. It follows simple instructions defined in a Fastfile. After you set up fastlane and your Fastfile, you can integrate App Distribution with your fastlane configuration.

Before you begin

  1. Install and set up fastlane.
  2. Install or update to the latest version of the Firebase CLI (we recommend downloading the standalone binary for the CLI specific to your OS). Make sure to sign in and test that you can access your projects.

1. Set up fastlane and your Fastfile

  1. Retrieve the installed path of the Firebase CLI. The path is used to configure your Fastfile in the next steps.
  2. Add App Distribution to your fastlane configuration by running the following command from the root of your iOS project:
    fastlane add_plugin firebase_app_distribution
  3. If the command prompts you with an option, select Option 3: RubyGems.org.

2. Distribute your app to testers

  1. In a lane in your ./fastlane/Fastfile, add a firebase_app_distribution block. Use the following parameters to configure the distribution:

    firebase_app_distribution parameters
    app

    Required: Your app's Firebase App ID. You can find the App ID in the Firebase console, on the General Settings page.

    app: "1:1234567890:ios:0a1b2c3d4e5f67890"
    firebase_cli_path

    Absolute path to the Firebase CLI binary. If unspecified, fastlane determines the binary's location from the output of which firebase.

    firebase_cli_token

    A refresh token that's printed when you authenticate your CI environment with the Firebase CLI (read Use the CLI with CI systems for more information).

    ipa_path

    Absolute path to the IPA file you want to upload. If unspecified, fastlane determines the file's location from the lane in which the file was generated.

    release_notes
    release_notes_file

    Release notes for this build.

    You can either specify the release notes directly:

    release_notes: "Text of release notes"

    Or, specify the path to a plain text file:

    release_notes_file: "/path/to/release-notes.txt"
    testers
    testers_file

    The email addresses of the testers you want to invite.

    You can specify the testers as a comma-separated list of email addresses:

    testers: "ali@example.com, bri@example.com, cal@example.com"

    Or, you can specify the path to a plain text file containing a comma-separated list of email addresses:

    testers_file: "/path/to/testers.txt"
    groups
    groups_file

    The tester groups you want to invite (refer to Manage testers). Groups are specified using group aliases, which you can look up in the Firebase console.

    You can specify the groups as a comma-separated list:

    groups: "qa-team, trusted-testers"

    Or, you can specify the path to a plain text file containing a comma-separated list of group names:

    groups_file: "/path/to/groups.txt"
    debug

    A boolean flag. You can set this to true to print verbose debug output, or false to print normal debug output.

    For example:

      platform :ios do
          desc "My awesome app"
          lane :distribute do
              build_ios_app(...) # build_ios_app is a built-in fastlane action.
    
              firebase_app_distribution(
                  app: "1:123456789:ios:abcd1234",
                  testers: "tester1@company.com, tester2@company.com",
                  release_notes: "Lots of amazing new features to test out!",
                  firebase_cli_path: "/absolute/path/to/firebase/cli/binary"
              )
    
          end
      end
      

  2. Finally, to make the build available to testers, run your lane:

    fastlane <lane>

After you distribute a new build, you can monitor the status of each tester—whether they accepted the invitation and whether they downloaded the app—in the Firebase console.