1.3.0
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
Dateis added as an atomic type.
Its default encoding uses the ISO8601 format thatNSDateencodes 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@Preftype declarations with less internal overhead now - Arrays and dictionaries with mixed value types (
[Any]or[String: Any]) are no longer usable directly with@Preftype declarations, and the type-erasure boxesAnyPrefsArrayandAnyPrefsDictionaryhave been removed from the library. Handling of mixed collections is now the responsibility of the user. See the updated README for more details.
- Arrays and dictionaries with a homogenous value type (ie: