SwiftUI / Xcode Error - Updating took more than 5 seconds SwiftUI / Xcode Error - Updating took more than 5 seconds xcode xcode

SwiftUI / Xcode Error - Updating took more than 5 seconds


In my case the issue was this line in Build settings:

enter image description here

Something I did accidentally changed signing settings in my project. Specifically, "signing identity" was set to "Sign to Run Locally.".For some reasons, SwiftUI Previews don't work then.

Simply deleting this line from build settings (aka setting default value) solved the problem.


Some time, the error displaying is not the real error.

For me it was because i missing : .environmentObject(...)


Try Clean (Shift + ⌘ + K) and Build (⌘ + B) to build again the SwiftUI project, it works in Xcode 11.6. Try building a basic hello world app.