Cannot preview in this file – SwiftUI Preview referencing deleted simulator

I'm running Xcode 26.2 (17C52).

After deleting all simulators and creating new ones, SwiftUI Preview stopped working.

Xcode reports: “Simulator [D774B214-XXXX-XXXX-XXXX-XXXXXXXX8288] failed to boot and may have crashed.”

However, when I list all available simulators using xcrun simctl list, there is no simulator with that identifier. It seems Xcode is still referencing a previously deleted simulator. I have tried:

  • Deleting all simulators again
  • Creating new simulators
  • Restarting Xcode and the system

But the issue persists and Preview still fails to launch.

  • Has anyone encountered this issue or knows how to clear the cached simulator reference used by SwiftUI Preview?

Hi,

Sorry to hear you are having trouble using previews. A few things you could try:

  • Run xcrun simctl --set previews list to see the list of previews sims. Perhaps you'll see the UUID list there
  • Similarly if you wanted to delete all the previews sims run xcrun simctl --set previews delete all
  • If you are still seeing issues we'd suggest filing a feedback report

We will need the diagnostics Xcode Previews generates in order to help us understand the error the previews system is encountering.

Install the logging profile using instructions available here: https://developer.apple.com/bug-reporting/profiles-and-logs/?name=swift On your mac running Xcode, and on your physical preview device (if you are using one).

Install the logging profile using the following instructions on your mac running Xcode; and if you are using one, your physical preview device (iOS or visionOS): https://developer.apple.com/bug-reporting/profiles-and-logs/?name=swift

Then when you reproduce the problem in Xcode:

  1. Either (a) an error banner will appear, click the "Diagnostics" button in that banner; or (b) if you're not seeing an error but you still want to provide diagnostics you can get the same diagnostics window by going under the Editor menu in the menu bar, then selecting the Canvas submenu, then selecting "Diagnostics".
  2. In the sheet that appears, click "Generate Report" in the bottom left of the sheet
  3. Attach (or make from the folder) the resulting zip file to the bug (will be named something like previews-diagnostics-0123456789.zip)
  4. Generate a sysdiagnose on your mac and any on-device preview devices, and attach those too
Cannot preview in this file – SwiftUI Preview referencing deleted simulator
 
 
Q