Post

Replies

Boosts

Views

Activity

SwiftUI preview failed to launch app in reasonable time in Xcode 12.4
I am trying to get started with SwiftUI but whenever I try to start the preview window I see a spinner for a minute or more ( it's currently been spinning for around 10 minutes ) followed by the message Failed to launch app "myApp.app" in reasonable time. The app only contains an Image and a couple of ToolbarItems, there's no logic there yet and the spinner keeps on spinning long after the build is complete. Clicking on Diagnostics gives little more information: AppLaunchTimeoutError: Failed to launch app "myApp.app" in reasonable time The app "myApp.app" did not launch on "iPhone 11" in 15 seconds. Things I have tried: Cleaning and rebuilding. Excluding the arm64 build target. Changing the target device. Using xcrun simctl shutdown all followed by scrub simctl erase all ( although this does seem to cause it to fail more quickly ) Clearing the contents of my ~/Library/Xcode/UserData/Previews folder. At some point trying all of these something did work because I was briefly able to use it, but the next time I restarted the problem was back. If I run the app in the emulator it does load but also takes a very long time to start. I'm using Xcode 12.4 on Big Sur.
4
2
6k
Feb ’21