Xcode simulators get deleted/corrupted after a restart

I'm running the latest Xcode 15.0.1 installed manually (not from App Store). Tried installing the iOS 17.0 runtime directly from Xcode. It usually gets corrupted mid installation, or when it finally installs, the simulators are still not available. Afterwards I tried installing simulators directly through .img files, it worked in the past, but now it tells me there are duplicates. I've tried reinstalling Xcode with deleting all of it's caches, but I still have this problem.

Seems to be solved by adding a simulator runtime manually after deleting all other simulator runtimes by using xcrun simctl runtime delete.

If xcrun simctl gives this error:

xcrun: error: unable to find utility "simctl", not a developer tool or in PATH

Then you can try this:

sudo xcode-select -s /Applications/Xcode.app

Hat tip to this amazing answer: https://github.com/NativeScript/nativescript-cli/issues/3590#issuecomment-389490682

Xcode simulators get deleted/corrupted after a restart
 
 
Q