RSSAmplifier

Orestis Papadopoulos · Oct 10, 2021

UserDefaultsPersistable: Save and Load any struct to/from UserDefaults

0
Sign in to vote or save

This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.

The user’s defaults database is a key-value store that let’s you persist data across app launches. It is meant to be used to store user preferences. Using the Codeable protocol and a JSONEncoder you can very easily convert Swift types to JSON data in order to store them.

Read on /swift/userdefaults/ios/protocols/2021/10/10/userdefaultspersistable.html

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.