SwiftUI Preview Don't work iOS 15 Xcode 13.0

SwiftUI Preview Don't work. Progress Preparing iPhone Simulator for Previews.

SwiftUI Xcode version 13.0 macOS Big Sur version 11.6

Post not yet marked as solved Up vote post of sankon3 Down vote post of sankon3
8.9k views
  • Same here, I am facing the same problem too!!

  • well i had the same issue,what i did and i believe solved this for me was:

    make sure your apple id is connected

    2)when a system msg popped up for i clicked on "accept always" and ta daaa

  • Try changing the simulator version (ex iPhone 13 mini > iPhone 13 Pro Max)

Add a Comment

Replies

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

  1. When you get an error in Xcode Previews, an error banner appears in the canvas
  2. Click the "Diagnostics" button in that banner
  3. In the sheet that appears, click "Generate Report" in the bottom left of the sheet
  4. Attach (or make from the folder) the resulting zip file to the bug (will be named something like previews-diagnostics-0123456789.zip)

Report back here with the feedback ID and I'll make sure it gets to the right folks as soon as possible.

  • Please take a look same issue maybe, Feedback ID: FB9832055

  • no, that is a different issue

Add a Comment

I have the same Problem, unfortunately it is "Preparing iPhone Simulator for Previews" like forever. There is no error and therefore there is no way to clik a "Diagnostics" button... Is there an alternative way?

  • One thing you can try is to introduce an error in your code which should force the error banner to show up. If all else fails, then a simctl diagnose + sudo sysdiagnose might be enough for the engineers to triage the issue.

  • I introduced an error in my code and prepared a feedback: FB9705803

  • thanks, I'll make sure it got routed to the right team for triaging.

yes, I have an error with Xcode version 13.0 macOS Big Sur version 11.6 . it auto quit when I code wrong one line. I can't work. I already remove it and install 5 time again but it still. who can help me. please.

  • this sounds like a different issue than the this thread has been covering. Either way, please file a feedback and include the Xcode crash report and a sysdiagnose.

Add a Comment

I have the same issue. After cleanup of Derived data and restart of all simulator, I now receive "Message send failure" see: FB9834982

I have the same issue. Tried to clean Derived data folder, SwiftUI preview folder, removed and restored all simulators, but with no luck. Left it be for some while but the "Preparing iPhone Simulator for Previews" loader was spinning even after 30 minutes

The only solution is to pick another simulator

  • Ok so that's interesting. I tried switching to another simulator as well (hadn't tried that yet)...

    While waiting for "Preparing iPhone Simulator for Previews [spinner]"...Chose a different simulator (iPhone 12 Pro Max in this case, hadn't used that one before)

    Results:

    The "Preparing iPhone Simulator for Previews [spinner]"... keeps right on going... BUT...After about 20-30 seconds, I have a working SwiftUI preview again!UNFORTUNATELY... the "Preparing iPhone Simulator for Previews [spinner]"... is STILL spinning.

    It seems as if there's a hung process that just won't refuse to give up the ghost on the borked simulator.

    After the above, I tried quitting both Xcode and iOS Simulator and restarting. That seems to have stopped the wayward message/spinner problem, but now I'm afraid to go back to the borked simulator (iPhone 12 Pro) – worried it might "spread" or get even more sticky. :(

Add a Comment

Was struggling with this issue for the past few hours and just resolved it.

The issue was that the device chosen from the list of simulators runs on iOS 15.2, and when I go to Preferences > Components I wasn't seeing 15.2 listed, only 15.0. So to resolve this:

  1. I went to Window > Devices and Simulators
  2. Chose Simulators
  3. Clicked on the + at the bottom left corner
  4. Added a name and choose iOS 15.0 (since it was the only one I had in the components)
  5. Selected this new device in the list then tried to re-un the preview and it worked fine

Hope this helps someone.

  • thanks, this helped

  • I think this is the correct way, while my iOS is 15.8, now xcode has no 15.8 simulator, it turns my se 1 not working any more.

Add a Comment

I have the same error. After I re-install the Xcode, it finally prepare successfully.

In my case I messed up my previews by deleting simulator folders from the filesystem without going through xcode. I fixed this by running:

xcrun simctl --set previews delete all

  • This worked like charm!!

  • I did the same. Thanks for the hint. I just also had to mkdir '~/Library/Developer/Xcode/UserData/Previews/Simulator Devices'

  • This seems to have helped. Thanks!

Add a Comment

Bonjour, Je me trouve exactement dans la même situation. Comment faire ?