Skip to content
Documentation

Docs / Adapter commands / Xcode

Xcode adapter

Use Xcode's native compilation cache across compatible macOS machines. Stable physical source and DerivedData paths define which builds can share results.

Command
boringcache xcode
Protocol
Xcode compilation cache over Apple's content-addressable store
Action
mode: xcode

How the adapter works

Apple-native cache path

BoringCache uses Xcode's own compilation caching and CAS model instead of archiving derived data after the fact.

Fresh runners can start warm

Ephemeral macOS CI runners can reuse compiled work published by earlier trusted builds when Xcode, source, and DerivedData paths line up.

Stable paths define the cohort

Xcode 26 includes physical source and DerivedData paths in its cache identity. Different provider paths remain separate unless you stage builds at the same path.

Set up Xcode

Keep the cache tag and the xcodebuild command in .boringcache.toml, then run boringcache xcode. The adapter manages Xcode's native compilation cache and points the build at the derived-data path it provides.

[adapters.xcode]
tag = "xcode-cache"
command = ["xcodebuild", "-workspace", "App.xcworkspace", "-scheme", "App", "build"]

# Run: boringcache xcode

Before the first run

  • Run on macOS with Xcode 26.
  • Keep physical checkout and DerivedData paths stable across the runners expected to share compilation results.
  • Inspect boringcache xcode --dry-run --json before comparing different path cohorts.

Use the same adapter in GitHub Actions

The Action prepares the native Xcode compilation-cache bridge and exports a stable DerivedData path for the later xcodebuild step.

.github/workflows/ci.yml
- uses: boringcache/one@f0fb9b2d926a32b10c543e92093ba00c5a291b79 # v1.33.0
  with:
    trust-policy: auto
    mode: xcode

- run: xcodebuild -workspace App.xcworkspace -scheme App -derivedDataPath "$BORINGCACHE_XCODE_DERIVED_DATA_PATH" build

Approve the repository through Connect CI and grant the job contents: read and id-token: write. The Action uses that Machine connection. Pull requests restore by default; trusted jobs may publish. See the authentication example in the GitHub Actions reference for scoped credentials when OIDC is unavailable.

GitHub Actions reference

Benchmarks

OBS Studio · Xcode compilation-cache continuation

Tool reference

Check the tool's own reference when you need cache-key rules, build settings, or version-specific behavior.

All adapter commands

Compare every supported command, protocol, and Action mode in one place.

Adapter command index →

Need help or found something unclear? Open an issue or browse the CLI repo.