ServicesXcode Cloud

CI/CD for iOS with Xcode Cloud

Every pull request built and tested, and every release on TestFlight, without anyone archiving by hand.

What a good pipeline looks like

Xcode Cloud is Apple’s CI/CD service, built into Xcode and App Store Connect. It builds your app in the cloud, runs your tests, signs the build and can send it straight to TestFlight.

  1. PushA pull request or merge
  2. BuildIn Apple’s cloud
  3. TestUnit and UI tests
  4. ArchiveSigned automatically
  5. TestFlightTo your testers
  6. ReleaseWhen you say go

What I set up

  • Pull request workflow. Every pull request is built and tested before anyone reviews it.
  • Main branch workflow. Every merge produces a build for internal TestFlight testers.
  • Release workflow. A tag archives the release and sends it to external testers or App Store review.
  • Custom scripts. Linting, dependencies or code generation in ci_scripts, and secrets kept as environment variables.
  • Fast feedback. Test plans running on several simulators in parallel, with results posted to Slack or email.
#!/bin/sh
# ci_scripts/ci_post_clone.sh
# Runs in Xcode Cloud right after the repo is cloned.
set -e

brew install swiftlint
cd "$CI_PRIMARY_REPOSITORY_PATH"
swiftlint --strict

Xcode Cloud or something else?

I’ve worked with Xcode Cloud, Bitrise, CircleCI and Fastlane, so I’ll recommend what fits rather than one tool for everything.

Xcode Cloud is a great fit when

  • Your app ships only on Apple platforms
  • You want the least setup and no build machines to maintain
  • You want builds to land in TestFlight with no extra steps

Bitrise, CircleCI or Fastlane fit better when

  • You also ship Android, for example with React Native
  • You need custom build machines or unusual tools
  • Your pipeline is shared with web and backend projects
Nishanth Kumar

Have an idea, a role or a codebase to review?

Book a time straight in my calendar, or send a message and I’ll get back to you.

You can also find me on LinkedIn or download my résumé. Have a question first? Read the FAQ.