Xcode 14.2: Cannot preview in this file - Cannot connect to <any simulator>

I always get this error when trying to show a preview since yesterday after updating to Xcode 14.2. Before that update, previews in Xcode 14.1 worked fine. Now I always get this error...

I quit and relaunched Xcode several times. I trashed Xcode, downloaded a new copy from Apple Developer, same result. I deleted the Simulator "iPhone 14 Pro" and created a new one. Same result...

Hi,

Sorry to hear you are having problems getting previews working. The best next step will be to file a feedback with diagnostics so we can take a look. We will need the diagnostics Xcode Previews generates in order to make sure we understand the error the previews system is encountering.

If you are having issues with macOS, catalyst or on-device iOS previews then download and install the logging profile for your device. Instructions and profiles are available here: https://developer.apple.com/bug-reporting/profiles-and-logs/?name=swift Attach the sysdiagnose to the bug report as well as the diagnostics using the instructions below.

Then when you get an error in Xcode Previews, an error banner appears in the canvas

  1. Click the "Diagnostics" button in that banner (or if the banner is missing you can use the menu: Editor > Canvas > 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)

FB11880907

Added a new user account. Launched Xcode, new project, got the error message:
 Cannot preview in this file - Timed out waiting for connection to DTS…

After another reboot of my MacBook, previews worked again in both accounts. You can close this bug, if you think it’s normal to reboot twice or more after an Xcode update to regain all functionality…

I had the same issue, I upgrade to MACOX 13.1 (22C65) and that solve that problem with the Simulators. You may have to clean your workspace and recompile.

Xcode 14.2: Cannot preview in this file - Cannot connect to &lt;any simulator&gt;
 
 
Q