register(defaults:)
Specifies the set of default settings and values to use as a fallback in cases where the app domain doesn’t have them.
Declaration
func register(defaults registrationDictionary: [String : Any])Parameters
- registrationDictionary:
The dictionary of key-value pairs that contain the default values for your app’s settings. Build this dictionary programmatically or load it from a property list resource file in your app’s bundle.
Mentioned in
Discussion
Call this method shortly after launch to specify the default values for your app’s settings. This method assigns the key-value pairs you provide to the registration domain, which is typically the last domain in the search list. The registration domain is volatile, so you must register the set of default values each time your app launches.