Sets an object for the specified key in the key-value store.
- iOS 5.0+
- macOS 10.7+
- Mac Catalyst 13.0+
- tvOS 9.0+
The object you want to store. The type of the object must be one of the property list types:
NSDictionary. The total size (in bytes) of the object must not exceed the per-key size limits.
The key under which to store the value. The length of this key must not exceed 64 bytes using UTF8 encoding.
If the type of
an is not one of the property list types, this method does not set it in the key-value store. Instead, it logs an error and silently ignores the object.