Xcode 16 preview not working

I want to add SwiftUI to an existing package. Super simple to get started. It previews with Xcode 15.4, but gives an error on Xcode 16.0: JITError: Runtime linking failure

Anyone have an idea on what may be failing?

Full SwiftUI code:

import SwiftUI

struct Dashboard: View {
    var body: some View {
        Text("hello")
    }
}

#Preview {
    Dashboard()
}

Use Legacy Previews Execution is working so far.

Hello @MegaWatt, our engineering teams need to investigate this issue, as resolution may involve changes to Apple's software. I'd greatly appreciate it if you could open a bug report, include a sysdiagnose and the time you were able to reproduce the issue, and post the FB number here once you do. Bug Reporting: How and Why? has tips on creating your bug report.

Very sorry to hear you're having trouble getting previews working. The best next step will be to file a feedback with some extra 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)

Generate the sysdiagnose(s) and attach those too.

Xcode 16 preview not working
 
 
Q