Instance Method

setDictionary:forKey:

Sets a dictionary object for the specified key in the key-value store.

Declaration

- (void)setDictionary:(NSDictionary<NSString *,id> *)aDictionary forKey:(NSString *)aKey;

Parameters

aDictionary

A dictionary whose contents can be stored in a property list format. In other words, the objects in the dictionary must be of the types NSNumber, NSString, NSDate, NSData, NSArray, or NSDictionary. The total size (in bytes) of the dictionary and its contents must not exceed the per-key size limits.

aKey

The key under which to store the value. The length of this key must not exceed 64 bytes using UTF8 encoding.