xcodebuild hangs resolving the simulator destination

xcodebuild stalls while resolving or selecting a simulator destination — sometimes for minutes — before a single test runs.

Strong fit Likely class: destination resolution / CoreSimulator enumeration · Updated

Symptom

You run xcodebuild test (or build-for-testing / test-without-building) and the command sits at destination resolution for a long time — sometimes seconds, sometimes minutes — without ever starting a test. The terminal looks alive but nothing is happening.

What it usually looks like

Common signatures:

Why it happens / likely failure classes

This is usually destination resolution, not your tests. xcodebuild has to turn your -destination string into a concrete, usable simulator. To do that it talks to CoreSimulator and enumerates devices and runtimes. Several things can make that slow or stuck:

Quick checks

Run these in a clean terminal to see whether the simulator subsystem is healthy:

# Does device enumeration itself return promptly?
time xcrun simctl list devices available

# What does Xcode think your destinations are? (slow here ≈ resolution problem)
xcodebuild -showdestinations -scheme YourScheme -workspace YourApp.xcworkspace

# Is anything already holding the simulator subsystem busy?
pgrep -lf CoreSimulator
pgrep -lf 'xcodebuild|simctl|Simulator'

If simctl list is itself slow, the problem is below xcodebuild — treat it as a CoreSimulator/simctl issue first.

Manual mitigations

When XCSteward may help

This is one of the failure classes XCSteward is designed for. It can:

It is worth testing against this class of failure if your hangs happen before tests start.

When XCSteward probably will not help

Common questions

What does "xcodebuild hangs resolving the simulator destination" usually mean?
It usually points to destination resolution / CoreSimulator enumeration. xcodebuild stalls while resolving or selecting a simulator destination — sometimes for minutes — before a single test runs. Start by checking simulator readiness, destination selection, CoreSimulator/simctl responsiveness, and whether another xcodebuild, simctl, or Simulator process is already active before treating it as a test-code failure.
Can XCSteward help with "xcodebuild hangs resolving the simulator destination"?
This is a strong fit when the failure is operational: simulator readiness, destination resolution, CoreSimulator responsiveness, cleanup, timeouts, or local concurrency. XCSteward may help by making those phases bounded, serialized, and easier to inspect. It will not fix broken tests, code signing, missing runtimes, or vendor image bugs.
What should I check first?
Check whether xcrun simctl commands return promptly, whether xcodebuild can resolve a concrete simulator destination, whether the device is truly ready rather than merely Booted, and whether concurrent agents, scripts, or manual runs are touching the same simulator subsystem.