Contents

setPersistentDomain(_:forName:)

Replaces the keys and values in the specified domain with the new keys and values you supply.

Declaration

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

Parameters

  • domain:

    A dictionary of keys and values to assign to the domain.

  • domainName:

    The name of the domain to update. If you specify the identifier for the argument or registration domain, this method throws an exception.

Discussion

This method removes the existing keys from the specified domain and then adds the new keys you provide. After updating the keys, this method generates a didChangeNotification for registered observers.

See Also

Managing domain-specific values