Iphone simulator not working in Xcode

I'm new to Xcode, and I'm learning using the apple swiftUI tutorial: https://developer.apple.com/tutorials/swiftui/creating-and-combining-views

I did the first few steps, but I can't get the simulator preview to work.

My mac and Xcode are updated, but I can't it to load.

Everything works fine when I do a mac project.

Thanks in advance.

Replies

Here's what's happening

Try deleting the current iPhone simulator that is installed on Xcode, and then reinstall the iPhone simulator.

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.

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