WWDC.ai

Build, deliver, and automate with Xcode Cloud

Set up Xcode Cloud builds, tests, TestFlight distribution, webhooks, and additional Git repositories directly from Xcode.

Watch on Apple Developer

TL;DR

  • Xcode Cloud is positioned as cloud CI/CD for Apple apps, running builds and tests on ephemeral virtual machines across devices and OS versions.
  • The session walks through onboarding iOS and macOS products from Xcode's Cloud report navigator by connecting the source repository and starting default workflows.
  • Distribution setup can create the App Store Connect app record, register Bundle ID and SKU, and generate a TestFlight distribution workflow from Xcode.
  • Webhooks and additional repositories extend workflows by sending build lifecycle payloads to external services and granting builds access to shared dependencies.

Xcode Cloud fundamentals

Xcode Cloud is a continuous integration and delivery service built into Xcode for Apple-platform development. It builds and tests apps in the cloud, then supports delivery to TestFlight and the App Store when the app is ready for feedback or release.

The session frames Xcode Cloud as a way to keep up with faster iteration, including agent-assisted coding in Xcode, by moving recurring build and test work off the local machine.

  • Builds and tests can run in parallel across multiple devices and OS versions.
  • Cloud automation helps catch regressions, bugs, and performance issues before they reach customers.
  • Xcode Cloud can be used for both new projects and existing apps already using Xcode workflows.

Onboard an app from Xcode

Onboarding starts in Xcode's Report navigator under the Cloud tab. The onboarding assistant shows products in the workspace, uses the Developer Team from Signing & Distribution settings, and guides repository connection.

Xcode Cloud needs access to the source repository to build the app. The exact connection steps depend on the source provider. Once connected, Xcode Cloud creates a product and a default workflow, and the first build can be started from Xcode.

  • Open Report navigator → Cloud → Get Started.
  • Select the product and confirm the Developer Team.
  • Connect the source repository when prompted.
  • Finish onboarding, then start the first build from the Cloud section.

Repository and source handling

Xcode Cloud builds run on ephemeral virtual machines. Source code is fetched only when a build starts and is discarded when the build finishes. The session states that source code is not stored and Apple has no way to access it.

When multiple apps share a workspace and repository access has already been granted, adding another product can skip the repository connection step. The example onboards a macOS companion app from the same workspace by creating another workflow.

  • Use the More button in the Cloud navigator to create another workflow for another product.
  • Products in the same workspace can share repository access already granted to Xcode Cloud.
  • Additional workflows can later be expanded to cover more scenarios, platforms, and edge cases.

Set up TestFlight distribution

Xcode Cloud can configure distribution from Xcode. For the iOS app example, Set Up Distribution creates the app record on App Store Connect and prepares an internal TestFlight distribution workflow.

The setup assistant collects required App Store Connect properties such as app name, Bundle ID, and SKU. Xcode Cloud indicates when values are already taken so they can be changed without leaving the assistant.

  • From the Cloud navigator, secondary-click the product and choose Set Up Distribution.
  • Provide app name, Bundle ID, and SKU for the App Store Connect record.
  • Xcode Cloud creates the app record, verifies it, and registers the Bundle ID and SKU in the background.
  • For workflow-based setup, create an archive action; archiving is required for TestFlight distribution.

Automate with webhooks

Webhooks let Xcode Cloud send build event payloads to an external service, making them useful for dashboards, notifications, issue tracking, and other automation. The example configures a webhook named Dashboard with a publicly resolvable payload URL.

Xcode Cloud supports hooks for build creation, build start, and build completion. After a build runs, the Webhooks view shows delivery history and status indicators for the delivered events.

  • Open Manage Webhooks for a product in the Cloud navigator.
  • Add a webhook with a name and publicly resolvable Payload URL.
  • Run a build to test the webhook configuration.
  • Review delivery history to confirm lifecycle events were sent successfully.

Add repositories for shared dependencies

As a project grows, shared code may be split into separate Git repositories. Xcode Cloud repository management lets a product include additional repositories so cloud builds can fetch dependencies such as a shared framework.

The example adds a style framework repository through Manage Repositories. The primary repository appears first, and additional Git remote URLs can be added below it. If access to the remote provider has already been granted, no additional authorization is required.

  • Open Manage Repositories for the Xcode Cloud product.
  • Use Add in the Additional section.
  • Paste the Git remote URL for the dependency repository.
  • Confirm that future builds have access to all required repositories.
Unofficial, not associated with Apple. BySuperwall

On this page

Ask AI