Skip to content
Xcode build cache

Reuse Xcode compilation cache on a fresh Mac.

Share Xcode’s native compilation cache across compatible macOS builds. Reuse requires compatible Xcode versions and matching physical source and DerivedData paths.

.boringcache.toml
workspace = "my-org/app"

[adapters.xcode]
tag = "xcode-cache"
command = ["xcodebuild", "-workspace", "App.xcworkspace", "-scheme", "App", "build"]
boringcache xcode
permissions:
  contents: read
  id-token: write

steps:
  - uses: boringcache/one@f0fb9b2d926a32b10c543e92093ba00c5a291b79 # v1.33.0
    with:
      mode: xcode
      trust-policy: auto
  - run: xcodebuild -workspace App.xcworkspace -scheme App -derivedDataPath "$BORINGCACHE_XCODE_DERIVED_DATA_PATH" build
steps:
  - label: Build
    command: >
      boringcache ci run
      --oidc-provider buildkite
      -- boringcache xcode
build:
  timeout: 1h
  id_tokens:
    BORINGCACHE_OIDC_TOKEN:
      aud: urn:boringcache:workload
  script:
    - boringcache ci run --oidc-provider gitlab -- boringcache xcode

How BoringCache fits your build.

Native compilation cache

Use the cache Xcode already reads and writes.

Fresh CI machines

Restore reusable compiled work before the build.

Matching paths

Keep physical source and DerivedData paths aligned.

Make compatibility part of the setup.

A shared workspace alone is not enough for Xcode. Match the required paths across machines, or use a consistent staging path, so compiled results have compatible identities.

See cache activity across your Mac builds.

Track compilation-cache reads, transfers, and stored data in your workspace.

Explore the workspace →
Workspace insights

Cache activity

Inspect reads, misses, and writes.

Transfers

See what each build downloads and uploads.

Storage

Track stored cache data in your workspace.

Keep shared-cache publication in trusted jobs.

Give consumers restore access and publishers a separate permission. Connect supported CI through OIDC or use scoped credentials.

Connect your CI →

Separate readers and publishers

  • Trusted builds Publish shared cache for the next build Read + publish
  • Pull requests Restore cache without replacing it Read only
  • Local development Use a scoped credential for the workspace Scoped access

Before you connect.

Does this replace Xcode's build system?
No. xcodebuild still plans and runs the build. BoringCache manages the compilation cache it reads and writes.
Does it work on ephemeral macOS CI runners?
Yes, when builds use matching paths. Xcode includes physical source and DerivedData paths in cache identity, so runners need matching paths or the same staging path to share compiled work.
Can a local Mac reuse cache from any CI provider?
Not automatically. The workspace can be the same, but builds with different physical source or DerivedData paths cannot share compiled results.
Read the Xcode setup guide →

Start with your next Xcode build.

Install the CLI. Run onboarding to connect your repository and configure your cache.

30 GB of cache free. No credit card required.

curl -sSL https://install.boringcache.com/install.sh | sh
boringcache onboard
boringcache xcode