Fixed Xcode Compilation Cache misses caused by changing checkout paths

Description

We’ve shipped a Bitrise Build Cache CLI fix that improves cache reuse for affected Xcode builds by stabilizing cache keys across different build paths.

Highlights:

  • CLI v2.8.5 update: The Build Cache CLI now injects CLANG_ENABLE_PREFIX_MAPPING=YES into the Xcode compilation cache settings it passes to xcodebuild, alongside the existing compilation cache-related settings.
  • Delivered through Step updates: This fix is available through the following Step releases:
    • activate-build-cache-for-xcode 0.13.7
    • activate-react-native-features 0.8.7
  • Fixes path-sensitive cache keys: Previously, Xcode compilation cache keys could include absolute compile paths such as the working directory, source file path, or precompiled header include path. If those paths changed between builds, cache keys changed too, causing near-total cache misses.
  • Especially relevant for restored source workflows: This commonly affected React Native apps and any pipeline using the pull-intermediate-files Step, where source code is restored into a different temporary directory on each build.
  • Stable cache keys across builds and machines: With prefix mapping enabled, toolchain, SDK, and working-directory prefixes are canonicalized, making Xcode compilation cache keys stable regardless of the absolute checkout path.
  • Improved cache reuse: Affected projects should now see cache hits where they previously re-uploaded compiled outputs instead of reusing them.

Why This Matters

If your Xcode build runs from a different absolute path on every build, compilation cache reuse can break down even when the actual source inputs are unchanged. This fix restores the expected benefit of Xcode compilation caching for those workflows, especially in setups where source is restored into per-build temporary directories.

Bottom line: Xcode compilation cache on Bitrise is now more resilient to changing checkout paths, helping affected projects reuse cached outputs correctly instead of missing and re-uploading them every time.