There are some good references online to the SceneStorage addition to SwiftUI, and it seems a great solution for basic scene restoration. There are some significant caveats that imply we will must have a mastery of the app's lifecycle to save and restore application data. Coming from UIKit we would tap into Appdelegate events... I am unclear what is the right way within this framework.
Post
Replies
Boosts
Views
Activity
@duncang I think SceneStorage is what you want
For anyone else reading this thread, I am going to go with saving context in sceneDidEnterBackground and loading context in scene.willConnectTo
I feel like I should also be hooking into sceneWillEnterForeground but so far in my testing I haven't needed to.