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 accessing Defaults[.key]) @sunshinejr
    • โž• Added default values protocols (DefaultsDefaultValueType, DefaultsDefaultArrayValueType) - this means that you can extend any type with default value so you can create non-optional DefaultsKey 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 implements NSCoding, RawRepresentable (enums as well) or Codable, you get default implementations for free! @sunshinejr
    • โž• Added automatic array support for any type that is available to SwiftyUserDefaults (means custom with DefaultsSerializable 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 and Any support (sorry, with all the changes in the library we had to, but you probably can bring it back with DefaultsSerializable anyways ๐Ÿ˜…) @sunshinejr