Instance Method

setVolatileDomain(_:forName:)

Sets the dictionary for the specified volatile domain.

Declaration

func setVolatileDomain(_ domain: [String : Any], forName domainName: String)

Parameters

domain

The dictionary of keys and values you want to assign to the domain.

domainName

The domain whose keys and values you want to set.

Discussion

This method raises an NSInvalidArgumentException if a volatile domain with the specified name already exists.

See Also

Maintaining Volatile Domains

var volatileDomainNames: [String]

The current volatile domain names.

func volatileDomain(forName: String) -> [String : Any]

Returns the dictionary for the specified volatile domain.

func removeVolatileDomain(forName: String)

Removes the specified volatile domain from the user’s defaults.