Continuously releasing Flutter iOS app to TestFlight using Appcenter

Iqan Shaikh
4 min readAug 31, 2020

--

In this tutorial, we will be setting up an automated release process for flutter application build for iOS. Using Appcenter, we will build iOS application and release it to Test Flight for beta testing.

To follow along with this tutorial, you need an Apple developers account, Flutter application, a repository in GitHub, an account on Microsoft App Center and a MacOS device(one time needed).

We will create a simple workflow to release application in TestFlight using App Center. If you are new to iOS development, please read this tutorial to prepare app for release on TestFlight. https://medium.com/@iqan/releasing-flutter-ios-app-to-testflight-using-xcode-21571299dbc3

Add a script for building Flutter app

App Center does not support Flutter application build out of the box. So we need to add a script that will be run before App Center builds Xcode project.

Add below script in your flutter project ios directory.

This script will run before Xcode build.

Create a new app in App Center

Navigate to: https://appcenter.ms/apps and add a new app.

Fill app details and select iOS for OS and Objeective-C/Swift for Platform

Connect your application repository to this project

Once connected, you will see all branches listed in App Center

Click on the icon at the right end and configure build

Configure build for iOS

As you can see here, there is a Post-clone script added in build configuration. This is the same script we added in previous step to build flutter app.

Enable Sign builds and upload your provisioning profile and signing certificate. This is required to sign app otherwise App Store will reject uploading of this app.

Click on Save.

Setup app Distribution to Test Flight

Go to Distribute > Store to establish connection with App Store

Select App Store and application that you want to use to release apps to. Ensure that certificate and provisioning profile for this app are same in App Center and when you published it for the first time using Xcode.

Go back to Builds and Enable Distribution

It’s all set now. Click on Save and Build. It will start building app.

An email will be sent to Distribution list when app is published.

Wrapping up

This is how simple it is to setup an automated workflow to release iOS apps to Test Flight for internal users to test. App Center provides in-build steps for build, sign and distribute. You will only need to configure for app using valid provisioning profile and certificate.

Thanks for reading.

Have a lovely day :)

--

--

Iqan Shaikh

Sr. Full Stack Engineer | C# .NET | Azure | AWS | DevOps | React | Node | Docker | Flutter | ReactNative