Defaults icon indicating copy to clipboard operation
Defaults copied to clipboard

💾 Swifty and modern UserDefaults

Results 47 Defaults issues
Sort by recently updated
recently updated
newest added

It would be useful to be able to store a tuple with element of any of the supported types. The tuples would simply be stored as array, so we could...

enhancement

``` extension Defaults.Keys { static let foo = Key("foo", default: 1) } ``` Here I have some option that defaults to 1, but is optional. ``` Defaults[.foo] // => 1...

Currently I use 8.x with .updates to sync with iCloud manually. However, I find that when syncing with iCloud, it is better to use updates with initial: Bool to false....

https://github.com/sindresorhus/Defaults/pull/136#discussion_r1543401152

Would be nice to make it easier to mock user defaults in tests and previews. Feedback welcome on how this should look like.

I am getting the following error -[NSKeyedUnarchiver validateAllowedClass:forKey:] allowed unarchiving safe plist type ''NSString' (0x1e1552fd8) [/System/Library/Frameworks/Foundation.framework]' for key '********', even though it was not explicitly included in the client allowed...

It seems that optional keys are not caught by if (defaultValue as? _DefaultsOptionalProtocol)?._defaults_isNil == true { return } The good news is that this is caught in the tests...