Skip to content

1.3.0

Choose a tag to compare

@orchetect orchetect released this 10 Jan 23:32
· 67 commits to main since this release

PrefsKit 1.3.0

Note

PrefsKit 1.3.0 is a major update and brings substantial new features and robustness to existing features.

Note that this version brings some breaking changes since 1.2.x.

Tip

See the updated README.md for documentation on the new features.

New

  • Prefs storage backends capabilities have been expanded (#9) to allow:
    • initializing from plist, JSON, or custom serialization formats
    • importing content from plist, JSON, or custom serialization formats, replacing or merging with existing storage contents
    • exporting the storage as plist, JSON, or custom serialization formats
  • Date is added as an atomic type.
    Its default encoding uses the ISO8601 format that NSDate encodes for plists. This allows cross-compatibility between UserDefaults and plist files. (Custom coding can still be provided as before to override the encoding format.)

Changed

  • This release involves a substantial overhaul of how arrays and dictionaries are handled. (#8)
    • Arrays and dictionaries with a homogenous value type (ie: [Int], [String], [String: Int], [String: String]) remain directly usable in @Pref type declarations with less internal overhead now
    • Arrays and dictionaries with mixed value types ([Any] or [String: Any]) are no longer usable directly with @Pref type declarations, and the type-erasure boxes AnyPrefsArray and AnyPrefsDictionary have been removed from the library. Handling of mixed collections is now the responsibility of the user. See the updated README for more details.