I just stumbled upon a problem where the preview screen loads very long, the fans of my MacBook get loud and after a while preview says:
"Updating took more than 5 seconds"
Building an running the app didn't show any errors or warnings but the simulator just showed a completely black screen when running the app.
After going through my code line by line I found out that all those strange problems where caused by a missing dot.
How am I supposed to debug my code when XCode doesn't show me any error or warning and such simple mistakes can cause preview going crazy and simulator displaying a black screen?
I really really love SwiftUI, but I hope there is anything helping me to debug strange SwiftUI behaviour.
"Updating took more than 5 seconds"
Building an running the app didn't show any errors or warnings but the simulator just showed a completely black screen when running the app.
After going through my code line by line I found out that all those strange problems where caused by a missing dot.
Code Block swift MyCustomView() .padding() onTapGesture { self.showContent = true }
How am I supposed to debug my code when XCode doesn't show me any error or warning and such simple mistakes can cause preview going crazy and simulator displaying a black screen?
I really really love SwiftUI, but I hope there is anything helping me to debug strange SwiftUI behaviour.