Xcode 15 Previews Stuck on Loading Forever

Hi,

I have had this issue since I started working again in iOS this year with Xcode 15. What happened to the SwiftUI Previews?

My problem is that they are stuck forever in the Loading screen "Preparing iPhone Simulator for Previews". I now test the code on the actual Simulator and waiting for Xcode 16 to fix this.

The characteristics of my project are:

  • Using Swift Package Manager (10+ dependencies)
  • Using Unit Tests and Test Plans.
  • Using macOS Ventura (reverted from Sonoma because it's even worse)
  • Macbook Air M1 - 16GB of RAM.

I have tried everything including:

  • Erasing derived data.
  • Restarting.
  • Reinstalling the whole computer.
  • Reverting Sonoma to Ventura.
  • Reverting Xcode 15.2 to 15.1 and 15.0.1.
  • Using Previews_Provider and #Previews {}
  • Using completely empty projects to test previews.

Please help. Thanks

Replies

Hi,

Sorry to hear you are having problems getting previews working. 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