unarchiveObject(with:)
Decodes and returns the object graph previously encoded by NSKeyedArchiver and stored in a given NSData object.
Declaration
class func unarchiveObject(with data: Data) -> Any?Parameters
- data:
An object graph previously encoded by
NSKeyedArchiver.
Return Value
The object graph previously encoded by NSKeyedArchiver and stored in data.
Discussion
This method raises an invalidArgumentException if data is not a valid archive.