Releases: PittsCraft/PDefaults
1.0.2
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
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
- Remove swiftlint from Package.swift, add to CI by @PierreMardon in #30
Full Changelog: 1.0.0...1.0.1
1.0.0
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
, meaningPDefaults
acts likeCurrentValueSubject
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 inPDefaults
instances targeting the same keys.
Process improvement
- use GH action to build and perform tests
- integrate SwiftLint plugin
What's Changed (auto generated)
- Setup swiftlint, fix errors and warnings (ignore when relevant) by @PierreMardon in #12
- Update swift build script for GH action by @PierreMardon in #13
- No build and test GH action on develop push by @PierreMardon in #14
- Use KVO to propagate storage event by @PierreMardon in #16
- Add missing docstring to PDefaults isStoring property by @PierreMardon in #18
- Add GH action SPM cache by @PierreMardon in #17
- Cleanup Package.swift by @PierreMardon in #19
- Remove XCode generated files from repo by @PierreMardon in #20
- Add comment related rules to swiftlint by @PierreMardon in #25
- Mock by @PierreMardon in #24
- Default to didSet behavior, move initializer to new file by @PierreMardon in #26
- Create migration mechanism by @PierreMardon in #27
- Fix default behavior documentation, reorder README for readability by @PierreMardon in #28
Full Changelog: 0.0.6...1.0.0
0.0.6
- Remove Cocoapods support
- Add fallback constructors to highlight acceptable types
Full Changelog: 0.0.5...0.0.6
0.0.5
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
What's Changed
- Fix initial
nil
value for default non-nil value by @PierreMardon in #11
Full Changelog: 0.0.3...0.0.4
0.0.3
What's Changed
- Allow implicit nil value for nullables by @PierreMardon in #9
Full Changelog: 0.0.2...0.0.3
0.0.2
What's Changed
- Fix different suite storage ignored. Some additional cleanup. by @PierreMardon in #5
- Expose as Swift Package by @PierreMardon in #7
Full Changelog: 0.0.1...0.0.2