Start with a reproducible pipeline
Register a self-hosted macOS runner on the machine, then configure branches, test targets, and artifact paths to match your repository. First verify that a command-line build succeeds; then enable automatic triggers. This keeps environment issues separate from CI configuration when troubleshooting.
For sequential builds of a single app, start with Push M4 S: M4 / 16GB / 256GB SSD. Keep dependency and DerivedData caches so later jobs can reuse the same directories. Avoid having multiple jobs write to the same build output at once.
Year-round availability means you’re not relying on office power or local hosting. It doesn’t automatically recover failed jobs. Configure runner startup, retries, disk cleanup, and log notifications in your team’s pipeline.
Verify the archive before handing off to the runner
This example uses App.xcworkspace and the App scheme in your project directory. Replace them with your actual names before running.
xcodebuild -version
xcodebuild \
-workspace App.xcworkspace \
-scheme App \
-configuration Release \
-destination 'generic/platform=iOS' \
-derivedDataPath build/DerivedData \
-archivePath build/App.xcarchive \
archive
Set up signing beforehand. This command creates an archive; it does not export or upload it.