Defaults v4.0.0 Release Notes
Release Date: 2020-04-18 // over 4 years ago-
💥 Breaking
0️⃣ 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
0️⃣ Rename
DefaultsObservation
toDefaults.Observation
31b56ce
👌 Improvements
- ➕ Add
@Default
property wrapper for SwiftUI 12a65c0 - ➕ Add Combine publishers 6029ac7
🛠 Fixes
- 0️⃣
Defaults.reset()
now works with keys of different types, but it's limited to 10 keys because of Swift generics limitations 15c096d
0️⃣ v3.1.1...v4.0.0