Getting Started with Xcode Cloud

Learn how to use Xcode Cloud to test and deploy your app on TestFlight. By Josh Berlin.

5 (2) · 1 Review

Download materials
Save for later
Share
You are currently viewing page 3 of 3 of this article. Click here to view the first page.

Creating a Workflow to Make TestFlight Builds

Xcode Cloud is a perfect match for TestFlight. Apple made it easy for developers to deploy builds to their teams with Xcode Cloud.

In this section, you’ll create a workflow to deploy a build to internal testers in TestFlight any time you push changes to the main branch. Before you start, you’ll need to create a group of internal testers in App Store Connect. Open a browser and navigate to your app in App Store Connect. Select the TestFlight tab.

TestFlight settings

The Internal Testing section on the left sidebar is empty. Click the + next to Internal Testing to add a new group.

TestFlight create new internal group

Enter Internal Testers as the name for your group. Leave Enable automatic distribution selected so the builds distribute to your testers without any extra steps. Click Create to create your new group.

TestFlight created a new internal group

Click the + next to Testers (0) and add yourself as a tester. Great! You now have a group of testers for your Xcode Cloud workflow. Now you’re ready to open Xcode to set up your new workflow.

Navigate to the Report Navigator. Select the Cloud tab. This time, you’ll create a new workflow just for your internal testers. Click the circle button at the bottom left and select Create Workflow.

Xcode Cloud create a new TestFlight workflow

Select your app product and click Next.

Xcode Cloud select a product for the TestFlight workflow

First, change the workflow Name to TestFlight. Next, check the Restrict Editing check box.

Xcode Cloud restrict editing

Apple requires restricted editing for any workflows with external deployments.

Note: You can find more information about restricted workflow in Apple’s documentation in the Restrict who can edit a workflow section.

Next, add an Archive action by clicking the + next to Actions and selecting Archive. Xcode Cloud adds an archive action for iOS by default.

Xcode Cloud add archive action

By default, the Platform is set to iOS, and the Scheme is set to Coffee — which is precisely what you want. For this workflow, you’ll deploy an app to your internal testers. Change the Deployment Preparation to TestFlight (Internal Testing Only).

Before starting an Xcode Cloud build with your new workflow, you’ll create a Post-Actions step to deploy the TestFlight build to a group of internal testers. Xcode Cloud runs the Post-Actions steps after the iOS archive is complete.

Xcode Cloud add internal testing post action

Click the + next to Post-Actions and select TestFlight Internal Testing. Xcode Cloud adds the post-action, but displays a red X. The post-action does not contain any beta groups, so the action displays an error.

Xcode Cloud add internal test group to the post action

Click the + in the Groups section, and select your new Internal Testers group. Your group has one tester — you!

Xcode Cloud add internal testing group to the archive action

Click Add to add your group to the internal TestFlight deployment.

Xcode Cloud TestFlight workflow group added

Now, the workflow deploys a build to the Internal Testers group when the workflow runs. Click Save to create your new workflow.

Instead of pushing new code, you’ll manually run the workflow to test the deployment. Right-click your new TestFlight workflow and select Start Build.

Xcode Cloud start TestFlight build

Since you started the build manually, you’ll need to select a branch. Xcode Cloud displays a window for you to select the branch.

Xcode Cloud my branches filter

Switch the filter from Mine to All to display all the branches.

Xcode Cloud all branches filter

Select the main branch, and click Start Build. Now, sit back and relax while Xcode Cloud does all the work to create your new TestFlight build.

Xcode Cloud TestFlight workflow succeeded

After Xcode Cloud completes the build, you’ll receive an invite email from TestFlight. Accept the invite, and install your new app!

Where to Go From Here?

Download the completed project files by clicking the Download Materials button at the top or bottom of the tutorial.

Apple’s Xcode Cloud documentation is a good place to go if you’d like to learn more. You’ll find an article about setting up Xcode Cloud for your team. You’ll find another article about connecting Xcode Cloud to Slack.

We hope you enjoyed this tutorial. If you have any questions or comments, please join the forum discussion below!