XCode Previews

Hello... for some reason, XCode previews are no longer working for me. It was working fine a week ago, however, now no matter ho many times i reboot or restart my computer, the preview won't load. The preview is stuck on "loading Preview" no matter how long I wait. I ran the same files on swift playgrounds and the preview works fine there, but not on XCode.

I ran both my project and a completely new, unedited project and both will not preview- so I know it is not a problem with my file. Also, the second I open the app the preview pauses. Either way, I don't think an app with only one file should take so long to build...

Hi,

Sorry to hear you are having problems getting previews working. This kind of issue can often indicate a problem with the simulator. If you look into the folder ~/Library/Logs/DiagnosticReports, do you see any crash reports for your app or any other processes?

If nothing looks out of place, the best next step will be to file a feedback with diagnostics so we can take a look.

Steps to generate helpful diagnostics:

  1. Download and install the logging profile on all devices involved. Instructions and profiles are available here: https://developer.apple.com/bug-reporting/profiles-and-logs/?name=swift
  2. Reproduce the issue
  3. Click the "Diagnostics" button in the error banner in Previews' Canvas area (or if the banner is missing you can use the menu: Editor > Canvas > Diagnostics)
  4. In the sheet that appears, click "Generate Report" in the bottom left of the sheet
  5. Attach (or make from the folder) the resulting zip file to the bug report (will be named something like previews-diagnostics-0123456789.zip)
  6. Generate the sysdiagnose(s) and attach those too
  1. check for any pending macOS updates
  2. get the Latest version of iOS simulators
  3. clean build folder
  4. Quit xcode , reopen
  5. Now wait a few minutes it should work fine ...

i followed these steps and it worked for me

XCode Previews
 
 
Q