Failed to launch app in reasonable time Xcode 16

I've updated my computer to Sequoia 15, Xcode 16 and now no matter what I do, I am unable to work with Swift UI previews.

I get this error each time I try to run the preview:

Failed to launch app in reasonable time

I have done:

  1. Uninstall/Re-install Xcode
  2. Deleted derived data
  3. Deleted the simulator data
  4. Used DevCleaner to remove all data related to Xcode
  5. Searched all websites about this issue. ( Non shown a good solution )
  6. Write this question on here.

If anyone has found a solution, please let me know how you fixed it.

Answered by jshulman in 804193022

Same thing is happening to me. I set up an iOS 17.5 phone and chose it. That worked.

Accepted Answer

Same thing is happening to me. I set up an iOS 17.5 phone and chose it. That worked.

Thanks! this worked for me too.

What was the OS on the device when this failed? Can you gather diagnostics of the failure and file a feedback report?

I'm glad that picking an older phone got you past the issue. From what I can tell this is because this fell back to the legacy previews execution mode. We definitely still want to get the modern mode working for you so if you're able to some special diagnostics, we can investigate the root issue.

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.

I want to confirm the solution provided. I was facing a similar issue using iOS18 as minimum deployment in my application and downgrading to iOS 17 solved the problem

I am running macOS 15.0 (24A335) Xcode 16 for reference.

Facing the same problem. For us it seems to be related to the Project setup using Kotlin Multiplatform. Just downloading the example project from https://kmp.jetbrains.com/#newProject using native SwiftUI causes the same error. Maybe this has something to do with dynamic frameworks?

Damn… I need to user iOS 18

accepted answer works, but pls fix xcode

There's also a setting in Xcode 16:

Editor > Canvas > Use Legacy Previews Execution

This allowed me to use iOS 18 simulators for previews.

Failed to launch app in reasonable time Xcode 16
 
 
Q