SwiftUI Previews: 5s Update Error

Currently, I am developing a quite complex Mac application using Core Data together with SwiftUI. The first challenge I encountered was the SwiftUI preview. I implemented a special preview model with some test data that is assigned to the preview structs of my views as EnvironmentObject. That works fine and I enriched my application step by step.

Well, but suddenly the previews stopped to work. I always got the error message „Updating took more than 5 seconds.“ I suspected one of the recent changes to screw up my work although the completely built applications still worked fine. I walked through my code and certainly found some problematic points but nothing could make the preview show up again.

Weiterlesen