Type Property

standardUserDefaults

Returns the shared defaults object.

Declaration

@property(class, readonly, strong) NSUserDefaults *standardUserDefaults;

Return Value

The shared defaults object.

Discussion

If the shared defaults object doesn‘t yet exist, it‘s created with a search list containing the names of the following domains, in this order:

  • For managed devices only, a domain containing defaults set by an administrator

  • NSArgumentDomain, consisting of defaults parsed from the application’s arguments

  • For managed devices by an educational institution only, a domain containing defaults set in the iCloud key-value store

  • A domain identified by the application’s bundle identifier

  • NSGlobalDomain, consisting of defaults meant to be seen by all applications

  • NSRegistrationDomain, a set of temporary defaults whose values can be set by the application to ensure that searches will always be successful

The defaults are initialized for the current user. Subsequent modifications to the standard search list remain in effect even when this method is invoked again—the search list is guaranteed to be standard only the first time this method is invoked.

See Also

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software