33

While running a project into the simulator, it crashes after booting:

Crash: 'NSInternalInconsistencyException', reason: 'Device <redacted>, Booted) is available but has no defaultDisplay'

I already cleaned the project files and changed the iOS image but it crashes anyway. Any clue?

ricardopereira
  • 11,118
  • 5
  • 63
  • 81

1 Answers1

95

Close all simulators and just run

sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService

to restart the service. All simulators will launch as usual.

Valentin Mercier
  • 5,256
  • 3
  • 26
  • 50
ricardopereira
  • 11,118
  • 5
  • 63
  • 81
  • 7
    This answer is a true lifesaver, thank you. Sadly, this issue still persists in the final version of Xcode 10. – Tamás Sengel Sep 18 '18 at 05:36
  • This helped, but I would like to know what causes this issue? – SofDev Oct 12 '18 at 14:32
  • This glitch can manifest when toggling between different versions of Xcode. For example, it is repeatable when I initially open an app in Xcode 9.2, then later in Xcode 10. As @ricardopereira notes, killall will reset the sims. –  Oct 12 '18 at 15:23
  • 1
    saved it as an alias # Kill all simulator and restart the service `alias ksim='sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService'` – lal Nov 06 '18 at 20:06