standard
The shared defaults object for the current app.
Declaration
class var standard: UserDefaults { get }Return Value
The shared defaults object for the app.
Discussion
Each app maintains a single, shared defaults object for you to use in your code. The first time your app retrieves the value of this property, it creates the shared object and caches the result. Subsequent retrieval attempts return the cached object.
The shared object retrieves settings from all of the standard domains. If you add a domain using the addSuite(named:) method, the object retrieves values from that domain in addition to the standard ones. Custom domains remain in the search list until you remove them or the app exits. When you write settings using the shared object, it writes them to the current app’s settings.