Xcode Builds

Remote Xcode builds in ephemeral VMs on Apple silicon, driven from the API. The builds API is not available yet; macOS builds and tests (swift build, swift test, xcodebuild for macOS) run today inside a macOS VM.


Overview#

Xcode builds need a Mac. Sandal will run each build inside its own ephemeral macOS VM on Apple silicon hosts: one build per VM, destroyed when the build finishes. You get a clean VM, your source and a build, without maintaining a Mac build farm.

It is designed for:

  • CI builds, tests and archives without racking Mac minis
  • Agent-driven iOS development, an agent that writes Swift and needs to know whether it compiles
  • Building an app straight onto an iOS Simulator session for review

How a build will work#

A build will be one API request (sandal.builds.xcode.create in the TypeScript SDK). The request describes:

FieldWhat it is
actionbuild, test, archive, export or analyze
schemeThe Xcode scheme to build
destinationThe value you would pass to xcodebuild -destination
sourceEither a Git repository at a specific revision, or a source bundle you uploaded
xcodeImageId / xcodeVersionWhich macOS image and Xcode to build with
cacheScopenone, project or organization
exportMethodapp-store-connect, ad-hoc, development or enterprise (for export)
signingSecretRefA reference to signing material stored in the Sandal Vault, never the material itself
attachDeviceSessionIdInstall the result onto a running iOS Simulator session

Once the builds API opens, sandal macos images in the beta CLI lists the macOS images and Xcode versions your project can use.

Source upload#

Uploaded sources are content-addressed and chunked: you declare a manifest, upload only the chunks the server does not already have, then commit (beginSourceUpload, putSourceChunk, commitSourceUpload). Unchanged chunks from an earlier upload are reused, so a small diff uploads a small amount of data.

Progress and artifacts#

A build moves through phases (queued, preparing, syncing, resolving, building, exporting, attaching, finalizing). Read its event log with listEvents (resumable by sequence) or follow it live with streamEvents; cancel stops the build and destroys its VM.

Artifacts are announced in the event log as they are produced: app, ipa, archive (.xcarchive), xcresult, dsym, log and a manifest.

Signing#

Certificates and provisioning profiles are never part of a build request. The request carries only a Vault reference (signingSecretRef), which Sandal will resolve when the build runs inside its own VM.

Pricing#

See pricing for current rates.

Next steps#

  • Devices, iOS Simulator sessions and Android devices
  • Runners, GitHub Actions runners (macOS runners are not available yet)
  • Pricing, full platform pricing