Instance Method

persistentDomainForName:

Returns a dictionary representation of the defaults for the specified domain.

Declaration

- (NSDictionary<NSString *,id> *)persistentDomainForName:(NSString *)domainName;

Parameters

domainName

The name of the domain to be represented.

Return Value

A dictionary containing keys for each default name and their corresponding default values.

Discussion

Calling this method is equivalent to initializing a user defaults object with initWithSuiteName: passing domainName and calling the dictionaryRepresentation method on it.

See Also

Maintaining Persistent Domains

- setPersistentDomain:forName:

Sets a dictionary for the specified persistent domain.

- removePersistentDomainForName:

Removes the contents of the specified persistent domain from the user’s defaults.

- persistentDomainNames

Returns an array of the current persistent domain names.

Deprecated