Defaults

đź’ľ Swifty and modern UserDefaults

MIT License

Stars
1.8K
Committers
15

Bot releases are hidden (Show)

Defaults - Latest Release

Published by sindresorhus 8 months ago

Defaults -

Published by sindresorhus 8 months ago

Defaults -

Published by sindresorhus 8 months ago

Defaults -

Published by sindresorhus 8 months ago

Defaults -

Published by sindresorhus 9 months ago

Breaking

  • This package now requires macOS 11, iOS 13, tvOS 14, watchOS 7, visionOS 1 or later
  • Removed Defaults.migrate()

Fixes

  • Fix for freeze in MenuBarExtra and NavigationStack

Note

  • If you're upgrading from version 4, you need to update to version 5 first and go through the migration process

https://github.com/sindresorhus/Defaults/compare/v7.3.1...v8.0.0

Defaults -

Published by sindresorhus about 1 year ago

  • Fix support for non-string keys in dictionaries

https://github.com/sindresorhus/Defaults/compare/v7.3.0...v7.3.1

Defaults -

Published by sindresorhus about 1 year ago

Defaults -

Published by sindresorhus about 1 year ago

Defaults -

Published by sindresorhus over 1 year ago

  • Switch from deprecated NSSecureCoding API
    • If you have a custom bridge that accepts a NSSecureCoding object, you will have to make it NSSecureCoding → NSSecureCoding & NSObject

https://github.com/sindresorhus/Defaults/compare/v7.1.0...v7.2.0

Defaults -

Published by sindresorhus almost 2 years ago

  • Defaults will now show a runtime warning inside Xcode if you use a unsupported key name.
  • If you don't want to import this package in every file you use it, add the below to a file in your app. You can then use Defaults and @Default from anywhere without an import.
    import Defaults
    
    typealias Defaults = _Defaults
    typealias Default = _Default
    

https://github.com/sindresorhus/Defaults/compare/v7.0.0...v7.1.0

Defaults -

Published by sindresorhus almost 2 years ago

Breaking

Improvements

https://github.com/sindresorhus/Defaults/compare/v6.3.0...v7.0.0

Defaults -

Published by sindresorhus over 2 years ago

Defaults -

Published by sindresorhus over 2 years ago

The Swift version included in Xcode 13.3 has a bug that affects Defaults. If you get a compile error, see the workaround. Make sure you also upgrade to Defaults v6.2.1 (this version).

https://github.com/sindresorhus/Defaults/compare/v6.2.0...v6.2.1

Defaults -

Published by sindresorhus over 2 years ago

Defaults - v6.0.0

Published by sindresorhus about 3 years ago

Breaking

  • New platform requirements:
    • macOS 10.12 → 10.13
    • iOS 10 → 12
    • tvOS 10 → 12
    • watchOS 3 → 5

Improvements

Fixes

https://github.com/sindresorhus/Defaults/compare/v5.0.0...v6.0.0

Defaults -

Published by sindresorhus over 3 years ago

Breaking

  • Please read the migration guide.
  • Removed NSSecureCodingKey and NSSecureCodingOptionalKey.
    • You can now just use Key instead.
  • Dropped support for Carthage and CocoaPods.
    • If you use either of these, you can still use Swift Package Manager just for this package.

Improvements

  • Added support for more built-in Swift types.
  • Improved the stored representation of many types.
    • For example, Array is now stored as a native UserDefaults array instead of being stored as a JSON stringified string. Same with Set and Dictionary.
  • Enums no longer need to be Codable. (Existing usage requires migration)
  • Added support for storing NSColor and UIColor.
  • Added Defaults.Toggle.

Meta

Huge thanks to @hank121314 for doing a lot of the work on this release.


https://github.com/sindresorhus/Defaults/compare/v4.2.2...v5.0.0

Defaults -

Published by sindresorhus over 3 years ago

Please help us try out this beta release. And let us know if something in the migration guide could be improved.

Breaking

  • Please read the migration guide.
  • Removed NSSecureCodingKey and NSSecureCodingOptionalKey.
    • You can now just use Key instead.
  • Dropped support for Carthage and CocoaPods.
    • If you use either of these, you can still use Swift Package Manager just for this package.

Improvements

  • Added support for more built-in Swift types.
  • Improved the stored representation of many types.
    • For example, Array is now stored as a native UserDefaults array instead of being stored as a JSON stringified string. Same with Set and Dictionary.
  • Enums no longer need to be Codable. (Existing usage requires migration)
  • Added support for storing NSColor and UIColor.
  • Added Defaults.Toggle.

https://github.com/sindresorhus/Defaults/compare/v4.2.2...v5.0.0-beta.1

Defaults -

Published by sindresorhus over 3 years ago

Defaults -

Published by sindresorhus over 3 years ago