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.
xcrun: error: invalid active developer path
(/Applications/Xcode_15.0.app/Contents/Developer),
missing xcrun at: .../usr/bin/xcrunCommon 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.
ls /Applications | grep Xcode
sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
xcrun --versionInstall or reset the Command Line Tools
If no full Xcode is needed, install the CLT and reset the path.
xcode-select --install
sudo xcode-select --resetHow to prevent it
- Pin the Xcode version your image ships and select it explicitly in CI.
- Run
xcode-select -pearly to assert the path is valid. - Avoid hardcoding an Xcode app path that a newer image may not have.