Store key-value pairs persistently across launches of your app.
NSUserDefaults underneath but exposes a type-safe facade with lots of nice conveniences.
For a real-world example, see the Plash app.
- Strongly typed: You declare the type and default value upfront.
- Codable support: You can store any Codable value, like an enum.
- NSSecureCoding support: You can store any NSSecureCoding value.
- SwiftUI: Property wrapper that updates the view when the
- Publishers: Combine publishers built-in.
- Observation: Observe changes to keys.
- Debuggable: The data is stored as JSON-serialized values.
- Customizable: You can serialize and deserialize your own type in your own way.
Defaults Benefits over
- You define strongly-typed identifiers in a single place and can use them everywhere.
- You also define the default values in a single place instead of having to remember what default value you used in other places.
- You can use it outside of SwiftUI.
- Comes with Combine publisher.
- Supports many more types, even
- Easy to add support for your own custom types.
- Comes with a convenience SwiftUI
- macOS 10.13+
- iOS 12+
- tvOS 12+
- watchOS 5+
Mobile \ Read more \ 06.10
Lyft shared their work on improving mobile performance. They write that the strategies outlined in this article do not depend...
onX raised $87.4 for Outdoor maps
The company has developed several products, its top navigation apps being onX Hunt, onX Offroad and onX Backcountry.
ConfettiSwiftUI – Confetti Animations in SwiftUI
This is an open-source library to use with SwiftUI. It allows you to create and customize confetti animations. Built with...
Mobile \ Read more \ 05.10
Meta is under pressure from all sides. TikTok squeezed the youth out of the video, the real BeReal overtakes the...
Matter 1.0 Unified Standard for IoT Devices Published
Matter is a universal connectivity standard designed to make smart home devices easier to use.
Whetstone – Dependency Injection framework for Android
“An Anvil forges a Dagger. A Whetstone sharpens it. And when you’re not planning on using your Dagger, you may...