Post

Replies

Boosts

Views

Activity

Best practices for preserving data between app launches for SwiftUI
I understand how to use Codable to serialize data, how to read and write to UserDefaults, and that SwiftUI provides events like "sceneWillResignActive" and "sceneWillEnterForeground". What I am missing is how to tie all of this together - what are the best practices for preserving data between app launches for SwiftUI? It feels like I should capture important data values and write them during the Scene's lifecycle events. Can someone highlight an article or post that clarifies this? Thank you.
4
0
506
Jun ’20