Creating an Extension and Property Wrapper For UserDefaults in Swift

Before we start making an extension and a property wrapper for UserDefaults, first I want to talk about what those are.

What is UserDefaults:

If you want to save some simple things in your storage, for example, if the user has closed a screen or not yet, you can keep this information on UserDefaults. The short definition should be like this: UserDefaults is a .plist file in your app’s package. You use it to set and get simple data. It’s structure is similar to a dictionary, you can get and…

Tigran Mirijanyan


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store