Xcode 12 Beta Failed to launch app in reasonable time

When running Xcode 12.0 beta (12A6159) on both macOS 10.15.5 and the latest Big Sur beta, live preview of SwiftUI designs fail with the following:

AppLaunchTimeoutError: Failed to launch app "DemoApp.app" in reasonable time

The app "DemoApp.app" did not launch on "iPhone Xʀ" in 15 seconds.

Diagnostic output reads as follows:

bundle identifier: com. example.DemoApp
device UDID: BB7A7CF8-7F03-4CB3-A206-7406ACE23305
path: /Users/demo/Library/Developer/Xcode/DerivedData/DemoApp-fnkrhbehrcwouubnnjadkynbkgeh/Build/Intermediates.noindex/Previews/iOS/Products/Debug-iphonesimulator/DemoApp.app

I've tried this with multiple simulator configurations (for example iPhone 11 running iOS 14, iPhone SE running iOS 13 and so on).

I was wondering if anyone else has seen this or has suggestions for ways to solve the problem.


Hi,

Sorry to hear you are having trouble getting Previews working. We'd probably need you to file a feedback to help you resolve this issue, but I did notice something odd in the information you provided. Did you intend to have a space in the bundleID of your app bundle identifier: com. example.DemoApp -- notice the space between .com and example.
When filing the feedback make sure to include a sample project (if possible) and 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 the resulting zip file to the bug (will be named something like previews-diagnostics-0123456789.zip)

Cheers
Hi,

Thanks for the quick reply. The space in the bundle identifier must have been a mistake in the cut and paste, it isn't there in the the actual output in Xcode.

I'll file feedback including the diagnostic report as you suggest.

Thanks again
I’m having the same issue but with previews (works ok in simulator). The same code has working previews in Xcode 11.
I'm also having the same problem.
Me too.
Upgrade your Xcode 12 to Xcode12 Beta2. Before that, uninstall the previous version.
I had the same problem on Xcode beta 12, restarting Xcode helped solve it
Still on beta 1 and a complete restart of Xcode worked
Same issue , cleaning build folder and running code worked for me.
Xcode 12 Beta Failed to launch app in reasonable time
 
 
Q