When running unit tests or UI tests that cause a crash (even intentionally), the simulator itself crashes and can't be booted again in subsequent runs. This started happening from Xcode 26, our project never had this issue before (we had crashes before as well).
Steps to Reproduce:
- Run the unit test with fatalError().
- Observe the simulator crashes.
- On the next test run, the simulator fails to boot, remaining in a crashed or stuck state.
Example error: error = Error Domain=FBSOpenApplicationServiceErrorDomain Code=1 "Simulator device failed to launch com.xxx.xctrunner." UserInfo={NSLocalizedDescription=Simulator device failed to launch com.xxx.xctrunner., NSUnderlyingError=0x600009895830 {Error Domain=FBSOpenApplicationServiceErrorDomain Code=1 "The request to open "com.xxx.xctrunner" failed." UserInfo={BSErrorCodeDescription=RequestDenied, NSLocalizedDescription=The request to open "com.xxx.xctrunner" failed., NSUnderlyingError=0x6000085d9500 {Error Domain=FBProcessExit Code=64 "The process failed to launch." UserInfo={NSUnderlyingError=0x60000850b360 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo=0x600008999340 (not displayed)}, BSErrorCodeDescription=launch-failed, NSLocalizedFailureReason=The process failed to launch.}}, FBSOpenApplicationRequestID=0xbe36, NSLocalizedFailureReason=The request was denied by service delegate (SBMainWorkspace).}}, NSLocalizedFailureReason=The request was denied by service delegate (SBMainWorkspace)., FBSOpenApplicationRequestID=0xbe36, SimCallingSelector=launchApplicationWithID:options:pid:error:, BSErrorCodeDescription=RequestDenied})