Skip to content

Releases: jessesquires/Foil

5.0.1: Leftover Peanuts 🥜

15 Jan 19:54
bc08a46
Compare
Choose a tag to compare

This release closes the 5.0.1 milestone.

  • Addressed some potential edge cases and issues with optional types and failable initializers. (#95, @jessesquires)
    • The default implementation of UserDefaultsSerializable for Swift built-in types (Int, Double, String, etc.) now provides a non-failable initializer because these initializers cannot fail. This still satisfies the protocol requirements.
    • Added an assertionFailure to the UserDefaultsSerializable implementation for RawRepresentable to catch potential bugs when storing and fetching data after making changes to a RawRepresentable type.
    • Documentation has been updated with thorough explanations of edge cases and considerations for RawRepresentable types. Please see the README for further details.

Full Changelog: 5.0.0...5.0.1

5.0.0: Leftover Taco 🌮

11 Jan 20:49
f5d6633
Compare
Choose a tag to compare

This release closes the 5.0.0 milestone.

Breaking

  • The UserDefaultsSerializable protocol has changed. Previously, it declared the initializer init(storedValue:). It is now failable: init?(storedValue:). This change was necessary to accommodate Codable types (see below). (#92, @jessesquires)

  • Both property wrappers have been renamed. @WrappedDefault is now @FoilDefaultStorage and @WrappedDefaultOptional is now @FoilDefaultStorageOptional. To migrate, you can simply find-and-replace these names. Nothing else has changed. (#73, @jessesquires)

New

Changed

  • Upgrade to Xcode 15
  • Upgrade to Swift 5.9

Full Changelog: 4.0.1...5.0.0

4.0.1: Leftover Donut 🍩

03 Mar 05:13
977201c
Compare
Choose a tag to compare

This release closes the 4.0.1 milestone.

Fixed

  • WrappedDefaultOptional no longer crashes when the type stored in UserDefaults does not match the type being requested, nil is now returned instead. (#70, @ejensen)

New Contributors

Full Changelog: 4.0.0...4.0.1

4.0.0: Leftover Croissant 🥐

23 Dec 21:09
6feb585
Compare
Choose a tag to compare

This release closes the 4.0.0 milestone.

New

  • The publisher projected by the property wrapper now sends values when user defaults changes from anywhere. Previously, only when using the property wrapper's setter would the projected publisher send a new value. (#61, @nolanw)

Breaking

  • Due to #61 (see above), there are some (potentially) breaking changes with key names. If any of your keys are named like the following examples and you need to observe changes, you will need to migrate your key names.
    • Key names starting with an @ character do not notify observers on updates.
      • Example: @my-key-name
    • Key names containing a . character anywhere in the name do not notify observers on updates. (This is a side-effect of KeyPaths which include periods.)
      • Example: com.myApp.my-key-name

Changed

  • Upgrade to Xcode 14
  • Upgrade to Swift 5.7

New Contributors

Full Changelog: 3.0.0...4.0.0

3.0.0: Leftover Dim Sum 🥟

24 Jan 21:59
a62d470
Compare
Choose a tag to compare

This release closes the 3.0.0 milestone.

New

  • Refined the Combine API for responding to changes. This removes the need for the .publisher(for:) KVO API call. See the updated documentation for additional details. (#38, @JonnyBeeGod)

Breaking

  • Updated minimum deployment targets for all platforms
    • iOS 13.0
    • tvOS 13.0
    • watchOS 6.0
    • macOS 11.0

Full Changelog: 2.0.0...3.0.0

2.0.0: Leftover Curry 🍛

20 Nov 02:26
360ab4f
Compare
Choose a tag to compare

This release closes the 2.0.0 milestone.

Breaking

  • Implemented more succinct implicit initialization. See example below. (#36, @jessesquires)
// OLD
@WrappedDefault(keyName: "flag", defaultValue: true)
var flag: Bool

// NEW
@WrappedDefault(key: "flag")
var flag = true

Changed

Full Changelog: 1.2.0...2.0.0

1.2.0: Leftover Falafel 🧆

06 Jun 03:11
87c3057
Compare
Choose a tag to compare

This release closes the 1.2.0 milestone.

Full Changelog: 1.1.0...1.2.0

1.1.0: Leftover Pizza 🍕

27 May 22:12
75ae4b5
Compare
Choose a tag to compare

This release closes the 1.1.0 milestone.

  • Added support for custom RawRepresentable types (#10, @basememara)

  • Add default support for UInt (#3, #12, @jessesquires)

  • Updated documentation with examples for observing changes in defaults (#4, #5, @basememara)

  • Updated documentation with examples for observing changes in defaults when using Foil (#4, #5, @basememara)

  • Minor documentation and internal library improvements (@jessesquires)

Full Changelog: 1.0.0...1.1.0

1.0.0: Leftover Burrito 🌯

19 Mar 04:41
58771a1
Compare
Choose a tag to compare