Skip to content
Latchkey

Xcode "xcrun: error: invalid active developer path" in CI

xcrun could not find the active developer directory. Either the Command Line Tools are not installed, or xcode-select points at an Xcode that is not present on this runner image.

What this error means

A tool invocation through xcrun (e.g. xcrun simctl, xcrun altool) fails with "invalid active developer path" or "unable to find utility". It happens on images where the selected Xcode path does not exist.

Terminal
xcrun: error: invalid active developer path
(/Applications/Xcode_15.0.app/Contents/Developer),
missing xcrun at: .../usr/bin/xcrun

Common causes

xcode-select points at a missing Xcode

The runner image upgraded Xcode, but the selected developer path still references the old Xcode_15.0.app, which is no longer installed.

Command Line Tools not installed

On a bare image without the CLT, xcrun has no developer directory to resolve utilities from.

How to fix it

Select an Xcode that exists on the runner

List the installed Xcodes and point xcode-select at one of them.

Terminal
ls /Applications | grep Xcode
sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
xcrun --version

Install or reset the Command Line Tools

If no full Xcode is needed, install the CLT and reset the path.

Terminal
xcode-select --install
sudo xcode-select --reset

How to prevent it

  • Pin the Xcode version your image ships and select it explicitly in CI.
  • Run xcode-select -p early to assert the path is valid.
  • Avoid hardcoding an Xcode app path that a newer image may not have.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →