Skip to content

Releases: PittsCraft/PDefaults

1.0.2

23 Aug 16:32
6fac510
Compare
Choose a tag to compare

Minor release

An error message was updated, see below for details.

What's Changed

  • Enhance constructor error message in case the default value is missing by @PierreMardon in #31

Full Changelog: 1.0.1...1.0.2

Details

Declaring

    @PDefaults("user.wallpaper")
    var wallpaperData: Data

resulted in the error:

'init(_:suite:behavior:)' is unavailable: You can use PDefaults only types that either conform to Codable or are natively handled by UserDefaults

but the obvious mistake here is that there's no default value, being it implicitly nil (in case the intention was to use an optional type).

I couldn't manage to discriminate between the cases "valid type, missing default value" and "optional invalid type, no default value".

Thus the error message covering these cases is now:

'init(_:suite:behavior:)' is unavailable: You have to provide a default value or use an optional type. In the latter case, make sure the type either conforms to Codable or is natively handled by UserDefaults

1.0.1

03 Jul 18:44
57333e3
Compare
Choose a tag to compare

Minor release

SwiftLint used as a SPM plugin did cause build issues for Mac Catalyst build destination.
It also added an unnecessary overhead to all PDefaults user.

Thus, it's now run by CI only, and not part of the project itself anymore.

What's Changed

Full Changelog: 1.0.0...1.0.1

1.0.0

01 Jul 15:10
d760d2e
Compare
Choose a tag to compare

Major release

New features

  • Mocking
  • Migrations
  • Separated process reactivity (with app groups in mind)

Changes to base features

Regarding 0.X.Y versions features, there are two changes:

  • the default behavior is .didSet, meaning PDefaults acts like CurrentValueSubject by default
  • PDefaults detects changes from anywhere else using KVO. It unlocks app group reactivity, but be aware that any change performed by any other mean to a suite can lead to a value change in PDefaults instances targeting the same keys.

Process improvement

  • use GH action to build and perform tests
  • integrate SwiftLint plugin

What's Changed (auto generated)

Full Changelog: 0.0.6...1.0.0

0.0.6

26 Mar 21:20
9d25cd3
Compare
Choose a tag to compare
  • Remove Cocoapods support
  • Add fallback constructors to highlight acceptable types

Full Changelog: 0.0.5...0.0.6

0.0.5

23 Jan 14:37
9ff4602
Compare
Choose a tag to compare

Cocoapods was forgotten for the last 2 releases, no code change for SPM since 0.0.4.

Full Changelog: 0.0.4...0.0.5

0.0.4

24 Aug 15:36
14d4b42
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.0.3...0.0.4

0.0.3

17 Jul 12:08
a581421
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.0.2...0.0.3

0.0.2

23 Apr 19:39
454b968
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.0.1...0.0.2