Releases: sindresorhus/Defaults
Releases · sindresorhus/Defaults
v7.1.0
Defaultswill now show a runtime warning inside Xcode if you use a unsupported key name.- If you don't want to import this package in every file you use it, add the below to a file in your app. You can then use
Defaultsand@Defaultfrom anywhere without an import.import Defaults typealias Defaults = _Defaults typealias Default = _Default
v7.0.0
Breaking
- Target macOS 10.15, iOS 13, tvOS 13, watchOS 6 ea11b7a
- Require Xcode 14.1
Improvements
- Add
.updates()method to observe updates to values 7a22d37- I recommend moving to this method from
.observe()and.publisher(). While these methods will remain for a while, they will eventually be deprecated in favor of.updates().
- I recommend moving to this method from
- Support dynamic default value fbc67fd
- Support serializing and deserializing nested custom types be7e30b
v6.3.0
v6.2.1
The Swift version included in Xcode 13.3 has a bug that affects Defaults. If you get a compile error, see the workaround. Make sure you also upgrade to Defaults v6.2.1 (this version).
v6.2.0
- Add support for
UUID
v6.1.0
v6.0.0
Breaking
- New platform requirements:
- macOS 10.12 → 10.13
- iOS 10 → 12
- tvOS 10 → 12
- watchOS 3 → 5
Improvements
- Add
.defaultValueand.isDefaultValueto@Default#76 - Add
Defaults.AnySerializable#73 - Support types that conform to both
CodableandNSSecureCoding#80 - Add
Defaults.PreferNSSecureCodingandDefaults.PreferRawRepresentable#83
Fixes
- Fix archive error with Xcode 13 #81
v5.0.0
Breaking
- Please read the migration guide.
- Removed
NSSecureCodingKeyandNSSecureCodingOptionalKey.- You can now just use
Keyinstead.
- You can now just use
- Dropped support for Carthage and CocoaPods.
- If you use either of these, you can still use Swift Package Manager just for this package.
Improvements
- Added support for more built-in Swift types.
- Improved the stored representation of many types.
- For example,
Arrayis now stored as a native UserDefaults array instead of being stored as a JSON stringified string. Same withSetandDictionary.
- For example,
- Enums no longer need to be
Codable. (Existing usage requires migration) - Added support for storing
NSColorandUIColor. - Added
Defaults.Toggle.
Meta
Huge thanks to @hank121314 for doing a lot of the work on this release.
v5.0.0-beta.1
Please help us try out this beta release. And let us know if something in the migration guide could be improved.
Breaking
- Please read the migration guide.
- Removed
NSSecureCodingKeyandNSSecureCodingOptionalKey.- You can now just use
Keyinstead.
- You can now just use
- Dropped support for Carthage and CocoaPods.
- If you use either of these, you can still use Swift Package Manager just for this package.
Improvements
- Added support for more built-in Swift types.
- Improved the stored representation of many types.
- For example,
Arrayis now stored as a native UserDefaults array instead of being stored as a JSON stringified string. Same withSetandDictionary.
- For example,
- Enums no longer need to be
Codable. (Existing usage requires migration) - Added support for storing
NSColorandUIColor. - Added
Defaults.Toggle.