Xcode Cloud
Run iOS store builds on your own Xcode Cloud hours.
Your Apple Developer Program membership includes 25 Xcode Cloud compute hours a month. Liftbay can run iOS store builds there, signed by Apple and ready for TestFlight, and falls back to GitHub Actions when the hours run out or a build isn't a store build.
Connect
You need iOS signing set up first (liftbay credentials ios), which gives Liftbay an App Store Connect key.
npx liftbay xcode-cloud connectLiftbay finds your app in App Store Connect by its bundle identifier.
One-time step in App Store Connect: open the app, choose Xcode Cloud → Get Started, connect GitHub and select your repository. Apple's API can't do this step, so the command shows the link and waits until it's done.
Liftbay creates a workflow named Liftbay: one Archive action for iOS, no automatic starts. It only builds liftbay/build/* branches, and only when Liftbay starts it.
You can also connect from the project's Settings → Xcode Cloud in the dashboard.
Which engine builds
Each project has a setting, iOS builds run on: GitHub Actions or Xcode Cloud. Set it in the dashboard's project Settings, or with liftbay ci init --ios-engine xcode-cloud; liftbay init asks for it.
| Build | Engine |
|---|---|
iOS store build, the project set to Xcode Cloud, connected, hours left | Xcode Cloud |
iOS store build, the project set to Xcode Cloud, but not connected or out of hours | GitHub Actions, with a note in the build log |
Everything else (Android, internal, simulator, the project set to GitHub Actions) | GitHub Actions |
Builds started by agents and by git pushes follow the setting. liftbay build in a terminal asks for each iOS store build, defaulting to it; pass --engine xcode-cloud or --engine github-actions to choose without being asked.
Hours are estimated from the duration of this month's Xcode Cloud runs, since Apple doesn't publish usage. The estimate is shown in the dashboard and by liftbay xcode-cloud status.
What happens in a build
- Liftbay pushes a temporary branch,
liftbay/build/<id>, with one commit on top of the branch you build. It addsios/ci_scriptsand a small.liftbay/build.json, and no secrets. - Liftbay starts the Liftbay workflow on that branch.
- On Apple's Mac, the post-clone script fetches the build's variables from Liftbay with a one-time code, installs your dependencies, runs
expo prebuildfor Expo apps, andpod install. - Xcode Cloud archives and signs the app. Liftbay follows the run, imports the logs, warnings and errors into the build log, and keeps the
.ipa. - When the run ends, Liftbay deletes the branch.
Apple only publishes full logs when each action finishes, so the build log fills in at the end of each step.
Variables and secrets
Secrets never go on the branch: it lives in your repository. The branch only carries a one-time code. Liftbay hands out the variables once, and only when Apple confirms the exact run Liftbay started is running on the commit Liftbay pushed, from Apple's network. Variables are written to .env (read when the JavaScript bundle is built) and exported for the build scripts; their values are never printed.
Limits
- Cancel: Apple's API can't stop a running Xcode Cloud build. Cancelling in Liftbay ends the build and deletes the branch; cancel the run in App Store Connect too if it's still going.
- Store builds only: ad hoc and simulator builds run on GitHub Actions.
- TestFlight: builds are archived for App Store distribution. To send them to TestFlight automatically, add a TestFlight post-action to the Liftbay workflow once in App Store Connect.
Disconnect
npx liftbay xcode-cloud disconnectThis deletes the Liftbay workflow in Xcode Cloud; iOS builds go back to GitHub Actions.