runcloud xcode build uploads a bounded snapshot of your source, builds it on
macOS, streams a sanitized xcodebuild log, and keeps the build record and
artifact available through the authenticated API. You do not need an active
simulator session.
Build a simulator app
Authenticate once, then run the command from a directory that contains an Xcode project or workspace:iphonesimulator. --sdk selects the platform that the scheme
is built for; Xcode selects the SDK of each target. Native projects default to Debug;
detected React Native and Expo projects default to Release. If --scheme is
omitted, run.cloud uses the first shared scheme reported by the selected
workspace or project.
The output for an iOS simulator build is a gzip-compressed .app bundle. An
unsigned iphoneos build returns an app bundle, signed iOS builds return an
IPA, watchOS builds return a compressed watch app, and macOS builds return a
zipped .app.
Build a watchOS app
run.cloud builds both kinds of watch app. A standalone watch app builds its watchOS scheme for the watch simulator and returns a compressed watch app (artifact.kind is watch-app):
MyApp.app/Watch/. Its watch targets compile against the watchOS SDK:
--sdk watchos, or --sdk iphoneos for an
iOS app that embeds one) are not verified yet.
watchOS builds cannot be launched as simulator sessions, and build reuse
(rebundle) is available for iOS simulator builds only.
Build a macOS app
macOS builds are being rolled out. Until they are enabled for your environment, a request with--sdk macosx returns 400 with the message
“macOS builds (sdk macosx) are not enabled on this run.cloud environment yet”.
Build a macOS scheme with --sdk macosx. The output is the .app, zipped with
ditto -c -k --keepParent so its symbolic links, extended attributes and code
signature survive (artifact.kind is mac-app, content type
application/zip).
Without signing inputs, run.cloud builds without code signing and then signs
the bundle ad hoc (“Sign to Run Locally”), without entitlements. The app runs
on your Mac after you remove the quarantine attribute that the download adds:
developer-id method. A provisioning profile is needed
only when the app uses restricted entitlements (for example iCloud or push
notifications); it is a macOS Developer ID .provisionprofile, not a
.mobileprovision:
ENABLE_HARDENED_RUNTIME = YES) if
you plan to notarize the app: Apple’s notary service rejects apps without it.
run.cloud does not notarize yet, so notarize the zip yourself with
xcrun notarytool submit MyMacApp.zip --wait, then staple the ticket with
xcrun stapler staple MyMacApp.app.
Mac App Store and TestFlight distribution for macOS is not supported yet: an
Apple Distribution certificate or a Mac App Store profile fails the build with
an explicit error. macOS builds cannot be launched as simulator sessions.
Observe a detached build
Every accepted build has a durable ID. A detached client can reconnect, inspect state, resume reading the sanitized log, download an artifact, or cancel work:uploading, queued, running, staged, succeeded, failed,
and cancelled. Terminal records include an exit code. Failed records also
include the stage, a specific reason extracted from the retained log, a failure
category, and a suggested next action. The artifact endpoint requires the same
organization access as the build; any storage redirect it returns is short
lived.
Install as soon as the app is ready
A simulator app can become installable before its download is ready. The build reportsartifact.installable: true and an artifact.assetId. Its status may
still be staged while durable publication finishes. When the build and simulator
share a local network, run.cloud transfers the app locally and starts installation
without waiting for publication. Transfer selection is automatic; clients do not
receive or manage a private download URL.
xcode.wait() and CLI builds wait for terminal completion by default. Use that
default when downloading an artifact or selecting a build as a reuse basis.
--output requires terminal completion. A local transfer failure falls back to
durable storage; an install attempted before publication may wait up to 30 seconds
for that fallback and can fail if publication has not finished. You can inspect
the build and retry after succeeded. Local copies are retained for up to 24 hours;
reads do not extend that period. A completed artifact can be retrieved from durable
storage once to refresh its local copy for later sessions. Completed artifacts
remain installable when local storage is unavailable.
Supply a stable applicationId (SDK) or --application-id (CLI) across builds of
the same application. A newer successful build with a different native fingerprint
retires older local copies for that application; failed builds and same-fingerprint
rebundles preserve them. This changes local retention only: older completed build
artifacts remain available. Application identity is scoped to your account.
zone (SDK) or --zone (CLI) to build only on one
availability zone’s builders. A zone pin is strict: the build waits
for a builder in that zone and fails if none is online; it never moves to another
zone. Simulators created for the build’s Asset prefer that zone but are not bound
to it; pass the same zone when you create the session to keep it there (a
different zone then fails with zone_conflict).
--idempotency-key in CI. Repeating the same key with the same source and
options returns the original build. Reusing it with different input fails with
409 instead of starting ambiguous duplicate work.
Reuse the output as an Asset
Every verified build output has an immutable, organization-scoped Asset ID inartifact.assetId. The same output can be installed into several sessions
without downloading and uploading it again:
mobile launch is one retry-safe operation: it selects the output, creates a
session, installs the app, and returns the launch ID, session ID, current state,
or retained failure. Repeating the same key and request returns the same
operation and never allocates a second simulator. A changed request with the
same key returns 409.
The Asset ID is the authorization boundary, not a storage URL. run.cloud checks
that the build output and target session belong to the same organization, then
creates a short-lived, read-only download for the selected simulator host. The
Mac that built the app and the host running the simulator do not exchange
credentials and do not presign for each other.
Rebuild only JavaScript
An Expo simulator build records a fingerprint of its native shell. When only JavaScript and bundled assets change, reuse that shell:iphonesimulator outputs. run.cloud installs dependencies,
calculates the current native fingerprint, and stops with a compatibility
failure when native inputs differ from the basis. That failure includes the
action to run a full build and use the new build as the next basis. The original
Asset is never modified; the rebundle creates a new Asset whose
parentAssetId identifies its native-shell basis.
Replay build events
Organization event sequences are ordered and replayable. SavenextCursor
only after processing the returned page:
--build-id to select one build. Events contain product-visible state,
stage, output Asset metadata, and sanitized failure details without requiring
access to the build worker.
Delegate one launch safely
An organization member can mint an opaque capability for a worker that should read and launch one output, without sharing the organization API key:capability create; list commands
show metadata, never the token.
Project preparation
The builder supports these source preparation modes:- Existing
.xcworkspaceor.xcodeproj: select one with--workspaceor--project. They are mutually exclusive. - XcodeGen: pass
--xcodegen-spec, plus optional--xcodegen-projectand--xcodegen-project-rootpaths. - React Native or Expo: package installation and native project generation are
detected from
package.json; select a monorepo app with--expo-app-dir. - Git-dependent generation: pass
--git-initto initialize the uploaded snapshot before project preparation.
--dev-server-url preserves the launch URL in
the build request. Because this service does not pair a simulator, it does not
open the URL automatically. It is rejected for Release builds.
Dependency preparation recognizes npm, pnpm, Yarn, CocoaPods, Swift Package
Manager through Xcode, and Carthage project files. Source packaging omits VCS
data and common Xcode/dependency output directories. The root .gitignore is
honored, while .xcconfig files are preserved.
Use repeatable source controls when the defaults do not fit:
--ignore and --include accept regular expressions. Additional destinations
must stay inside the uploaded workspace or ~/. A symbolic link in the source is
uploaded as a copy of its target. A link that points outside the source directory
is rejected.
The compressed source limit is 100 MiB.
Build settings
Use a repeatable--build-setting KEY=VALUE for
SWIFT_ACTIVE_COMPILATION_CONDITIONS or an APP_CONFIG_ key:
APP_CONFIG_ keys are stored and logged as redacted secret inputs.
Arbitrary Xcode settings are rejected so a request cannot alter the runner or
signing environment.
Signing
For manual signing, provide one PKCS#12 certificate and one or more provisioning profiles. Device builds are selected automatically when signing is configured:ios.buildNumber in app.json), then
upload the signed IPA from your own pipeline with Apple’s Transporter or the
App Store Connect build upload API. Certificate material, passwords, profiles,
and signed upload URLs are not returned in build records.
Use --upload <filename> to choose the retained artifact filename, or
--signed-upload-url <https-url> to also upload the output to your own
short-lived destination. Those options are mutually exclusive.
TypeScript
The public SDK packages the same source snapshot and follows the same lifecycle:cloud.xcode.rebundle(process.cwd(), completed.id, options). Consume ordered
events with cloud.xcode.events({ after: cursor }) and persist the returned
nextCursor after handling the page.
See the TypeScript SDK reference for all option
and response types.
Intentional differences
The service intentionally keeps the following boundaries around remote builds:- Each request uses an immutable uploaded snapshot. It does not expose a persistent Mac instance, incremental source sync, DerivedData reuse, or a customer-managed cache toggle.
- Native-shell reuse is limited to compatible Expo Release simulator builds. Native changes require a full build; device signing does not use the rebundle path.
- A successful build remains independent of simulator capacity. Use the
explicit, idempotent
mobile launchoperation when a simulator should be created and the output installed. --no-waitand--detachuse the durable build ID for reconnection. There is no per-build callback URL option. Consumers replay ordered organization events instead of registering an outbound webhook.- Live command, stdout, and stderr events are combined into one ordered, sanitized log that can be resumed by byte offset.
- Every verified output is an immutable organization Asset.
--uploadchooses its filename; it does not return a durable bearer download URL or make a build output independently deletable. - A source symlink is uploaded as a copy of its target and is not recreated on the build machine. A symlink that points outside the source directory is rejected.
- App Store Connect keys are not accepted, so the upload to Apple happens in your own pipeline, never on a shared build machine.