Hello,
I'm digging with Swift 6/SwiftUI/Concurrency and looking for advice.
I have long running api which I need to call when app starts. When result is fetched its parts should be displayed/updated on corresponding views.
The question is: which approaches can be used in this situation? The only working approach I found is call api in app init() method, then store result in some storage (e.g. UserDefaults), post NSNotification and listen to this notification in each view.
I think this is not an optimal solution and there is more appropriate approaches. Could someone give a hint/tip?