v4.0.0
Important
If you use Swift Package Manager, you need to set the build setting “Other Linker Flags” to -weak_framework Combine
to work around this Xcode bug.
Breaking
- Get rid of
Defaults.OptionalKey
b2fdee2- Migrate:
extension Defaults.Keys {
- static let name = OptionalKey<Double>("name")
+ static let name = Key<Double?>("name")
}
- Remove the
.old
and.new
options forDefaults.observe
8376ca7- They're now the default. There was no good reason to not specify them and it was easy to leave them out by accident and then getting the incorrect
.newValue
/.oldValue
.
- They're now the default. There was no good reason to not specify them and it was easy to leave them out by accident and then getting the incorrect
- Rename
DefaultsObservation
toDefaults.Observation
31b56ce
Improvements
- Add
@Default
property wrapper for SwiftUI 12a65c0 - Add Combine publishers 6029ac7
.reset()
now actually removes the item instead of just setting its value tonil
.
Fixes
Defaults.reset()
now works with keys of different types, but it's limited to 10 keys because of Swift generics limitations 15c096d