This example application showcase a couple of ways to make an "Observable" abstraction around UserDefaults and the Keychain.
Making it possible to be notified in one part of the app when another part of the app changes a value stored in UserDefaults or the Keychain.
- ObservableDefaults: An abstraction around
UserDefaultsthat implementObservableObject. Will publish change events whenever any value changes. - SignalingDefaults: An abstraction around
UserDefaultsthat signals whenever a given value change. The benefit ofSignalingDefaultsoverObservableDefaultsis thatSignalingDefaultsonly signal changes on a per value basis. - ObservableKeychain: An abstraction around the
Keychainthat implementObservableObject. Will publish change events whenever any value changes. - SignalingKeychain: An abstraction around the
Keychainsignals whenever a given value change. The benefit ofSignalingKeychainoverObservableKeychainis thatSignalingKeychainonly signal changes on a per value basis.