In SwiftUI there is a property wrapper @AppStorage that gives developer the ability to store raw data (Strings, numbers, booleans, URLs) in cache. User interface then automatically updates itself when the underlying data change.
It should be possible to integrate the same functionality using DynamicProperty protocol into GoodPersistence property wrappers to extend system functionality to save any Codable data as JSON string, automatically (de)serialize when required, and auto-update the UI on property change.
It might be possible to integrate the same functionality for values stored in keychain also.
In SwiftUI there is a property wrapper
@AppStoragethat gives developer the ability to store raw data (Strings, numbers, booleans, URLs) in cache. User interface then automatically updates itself when the underlying data change.It should be possible to integrate the same functionality using
DynamicPropertyprotocol into GoodPersistence property wrappers to extend system functionality to save anyCodabledata as JSON string, automatically (de)serialize when required, and auto-update the UI on property change.It might be possible to integrate the same functionality for values stored in keychain also.