SwiftyUserDefaults v4.0.0-alpha.1 Release Notes
Release Date: 2018-05-08 // almost 6 years ago-
๐ฑ ๐๐๐
This is a huge release. Please try it out and let me know how it feels as we still have time for improvements!
Migration guide from 3.x to 4.x
๐ Changelog
- ๐ Swift 4.1 support @sunshinejr
- โ Added
Codable
support! @sunshinejr - โ Added generic subscripts support (better
DefaultsKey
init diagnostics and accessingDefaults[.key]
) @sunshinejr - โ Added default values protocols (
DefaultsDefaultValueType
,DefaultsDefaultArrayValueType
) - this means that you can extend any type with default value so you can create non-optionalDefaultsKey
afterwards! @sunshinejr - โ Added default values in
DefaultsKey
, e.g.DefaultsKey<String>("test", defaultValue: "default value")
@sunshinejr - โ Added better support for custom types: using
DefaultsSerializable
, when your type implementsNSCoding
,RawRepresentable
(enums as well) orCodable
, you get default implementations for free! @sunshinejr - โ Added automatic array support for any type that is available to
SwiftyUserDefaults
(means custom withDefaultsSerializable
as well!) @sunshinejr - โ Added Swift Package Manager support! @sunshinejr
- โ Added
[URL]
built-in support! @sunshinejr - โ A lot of infrastructure changes (CI, project), around 350 tests to make sure all of the changes work properly! @sunshinejr
- Removed legacy strings based API (
Defaults["test"]
),Dictionary
andAny
support (sorry, with all the changes in the library we had to, but you probably can bring it back withDefaultsSerializable
anyways ๐ ) @sunshinejr