Skip to content
Latchkey

XCUITest simulator "Unable to boot device" in CI

Before XCUITest runs, xcodebuild boots the destination simulator through CoreSimulator. On CI this boot is flaky: it can time out, hit a CoreSimulator service error, or fail because the requested device/runtime is not installed on the runner.

What this error means

The test build fails with "Unable to boot the Simulator", "Unable to boot device in current state: Booted", or "The request to open ... failed" during the xcodebuild test destination setup.

xcodebuild
Unable to boot device in current state: Booted
Domain: com.apple.CoreSimulator.SimError
xcodebuild: error: Failed to build/test: Simulator device failed to boot

Common causes

Transient CoreSimulator boot failure

A cold macOS runner boots simulators slowly and CoreSimulator can return an error or leave a device stuck, so the destination never comes up.

The destination device or runtime is not installed

The -destination names a simulator model or iOS runtime the runner image does not have, so it cannot boot.

How to fix it

Pre-boot an available destination

  1. List available simulators with xcrun simctl list devices available.
  2. Boot one before xcodebuild test and target it as the destination.
  3. Match the -destination OS to an installed runtime.
Terminal
xcrun simctl boot "iPhone 15"
xcodebuild test -scheme App \
  -destination 'platform=iOS Simulator,name=iPhone 15'

Reset a wedged CoreSimulator

Shut down and erase stale devices before retrying so a stuck state does not block the boot.

Terminal
xcrun simctl shutdown all
xcrun simctl erase all

How to prevent it

  • Target a simulator device/runtime the runner image provides.
  • Pre-boot the destination before xcodebuild test.
  • Clear stale simulators between jobs.

Related guides

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