Sets a dictionary for the specified persistent domain.
SDKs
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
- (void)setPersistentDomain:(NSDictionary<NSString *,id> *)domain forName:(NSString *)domainName;
Parameters
domain
A dictionary of keys and values you want to assign to the domain.
domainName
The name of the domain whose contents you want to set.
Discussion
Calling this method is equivalent to initializing a user defaults object with init
passing domain
, and calling the set
method for each key-value pair in domain
.
When a persistent domain is changed, an NSUser
is posted.