GoodPersistence icon indicating copy to clipboard operation
GoodPersistence copied to clipboard

SwiftUI Dynamic Property integration

Open plajdo opened this issue 1 year ago • 1 comments

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.

plajdo avatar Jan 31 '24 09:01 plajdo

Internal innovation board notion page link: https://www.notion.so/goodrequest/DynamicProperty-pre-GoodPersistence-8c28328a6cfc41a085456020e0ca6c7f?pvs=4

plajdo avatar Jan 31 '24 09:01 plajdo