Releases: sunshinejr/SwiftyUserDefaults
5.3.0
Changelog
- Renamed
OptionalType.empty
toOptionalType.__swifty_empty
. Also removed theOptionalType.wrapped
since it wasn't used in the framework anymore. Please note that this still shouldn't be something you rely on tho, we're gonna explore ways to remove the publicOptionalType
in a future releases. @sunshinejr
5.2.0
Changelog
- DefaultsAdapter's subscript setters are now
nonmutating
. This shouldn't change much on the client side, but it does fix the issue with simultaneous access (#241, #247). @sunshinejr - Added
DefaultsProviding
protocol thatDefaultsAdapter
implements. It should help with DI and creating test adapters (#268). @sunshinejr
5.1.0
This version only increases the minimum requirements for iOS to make it compatible with Xcode 12. Redone since we didn't bump podspec version for CocoaPods support.
5.0.0
Finally version 5.0.0 is ready to go! After extensive testing we are releasing this version to the public. 🚀
Very warm thank you to everyone participating in all these months of work: @marty-suzuki, @Z-JaDe, @philippec-ls and others that contributed to this project. On to the next year! 🥂
Note: There shouldn't be any differences between latest beta and this version so you should be ready to go with bumping the version in your favorite dependency manager. If you are migrating from version 4 and lower, please check our migration guides.
5.0.0-beta.5
Unfortunately we had to remove Combine for now to keep Xcode 10 compatibility 😭 You might want to update to that version ASAP as it's fixing crashes on release builds...
Changelog
- Removed Combine extensions for now. Due to problems with weak-linking the framework, it's too difficult to support it with ease using all package managers and also without breaking backwards-compatibility. Probably gonna introduce it once we only support Xcode 11. @sunshinejr
5.0.0-beta.4
Fixed a pretty bad indexing/building issue... See Migration Guide for more.
Changelog
- Fixed an issue with Xcode freezing, never-finishing indexing/building the project when we used
Defaults[\.keyPath]
in conditional statement. Unfortunately we had to addkey
label toDefaults[key: DefaultsKey<String?>...]
where you wouldn't have to add the label to the subscript before. @sunshinejr.
5.0.0-beta.3
Fixes to package managers! 🚀 Xcode 11 & Carthage are friends again. Also, you won't fetch testing libraries for SPM anymore so you can use your Xcode Previews again.
Changelog
- Fixed an issue with SPM integration - it no longer fetches testing libraries & doesn't create runtime crashes or Xcode Preview crashes anymore. @sunshinejr.
- Fixed an issue where Carthage users using Xcode 11 couldn't install SwiftyUserDefaults 5. We added weak-linking for the xcodeproj so you might need additional steps for Xcode 10 + Carthage + SwiftyUserDefaults 5.* users. @sunshinejr.
5.0.0-beta.2
This beta adds Combine support! Just use it on the DefaultsAdapter
(if you can use Combine
):
func obserColorScheme() {
colorSchemeObserver = Defaults.publisher(for: \.colorSchemeObserver)
.sink { value in
//
}
}
5.0.0-beta.1
This cool release prepares for Swift 5.1 - we introduce key path access (enabling dynamicMemberLookup
) and property wrapper! Additionally there are some changes to all Defaults
global variable, DefaultsKeys
and `DefaultsBridge - check out our migration guide for more.
Changelog
- Introduced
DefaultsAdapter
thats the main object for user defaults and theDefaults
global variable. @marty-suzuki - Thanks to
DefaultsAdapter
, if you are using Swift 5.1 you can use dyanmic member lookup! This allows you to use
Defaults.yourKey
instead ofDefaults[.yourKey]
. In case you are not using Swift 5.1, you would need to transition toDefaults[\.yourKey]
instead ofDefaults[.yourKey]
. @marty-suzuki - There is a new protocol,
DefaultsKeyStore
thatDefaultsKeys
conform to. This key store is then accepted by theDefaultsAdapter
so you can have multiple key stores for multiple adapters! @marty-suzuki - Unfortunately the above means that you need to declare your keys as a computed properties instead of static stored ones.@marty-suzuki
DefaultsBridge
is now a struct, not a class. You need to use composition instead of inheritance to compose them. @Z-JaDeDefaultsBridge
changed a little bit, there is noisSerialized
property anymore, if you create your own bridge you need to providedeserialize()
method as well. @Z-JaDe- Added
@SwiftyUserDefault
property wrapper for Swift 5.1 users! It uses key paths and has options to cache/observe your defaults as well. @sunshinejr - Updated project to recommended settings of Xcode 10.2. @philippec-ls
4.0.0
4.0.0 is finally out. A lot of cool features and improvements for you to try today! 🚀
Changes from 4.0.0-beta.2 to 4.0.0
- Updated
DefaultsKey.defaultValue
access level topublic
. @DivineDominion - Updated access level of all bridges to
open
frompublic
. @fredpi