The couple comments and then paragraph about having to restart the simulator:
... restart the simulator every 3rd try or so. Because if you don’t the workout will still be running in the background and everything just silently fails and you will think you have a bug in your code until you finally find the correct stack overflow reference that just explains this is the way life is.
Doesn't seem to happen to me in the standalone simulator or on a connected device. For me it seems to happen in the Preview, which is not the same thing. It seems to start when you manage to get the main app and the preview version out of sync, usually during a code edit and preview refresh.
The problem seems to go away if you handle previews and preview provider concurrency more explicitly:
https://developer.apple.com/documentation/swiftui/previewpro...
Also a current funny bug with SwiftUI, if you left out a “dot”, it will compile but crashes the app during runtime.
VStack { } navigationDestination(isPresented: $goToSettings) { }
There should be a dot before navigationDestination and this should not compile ever.
> And so Apple, I say, whoever had a hand in this should be ashamed of themselves. You can and should do better. I love SwiftUI. I love building iOS apps. But please clean this up.
As a recent macbook convert (work gave me one) I have to remind myself every day:
Apple is not a software company. Their business is to sell hardware at a premium. Software is an afterthought, and if they could offload software, they would. The sleek aluminium case, lovely screen, arm processor.. that's what you're getting.
You're not paying a premium for the inability to stack windows, or for shitty dual monitor support, or for awful application/state management.
Apple is a hardware company. They don't give a shit about software.
If you think this is bad, try an Apple TV app! A lot of the platform APIs, like the one mentioned in the article, are still in objective C and really beginning to show their age. The worst is when you want to do something in SwiftUI but the platform APIs are UIKit (‘: