unarchiveTopLevelObjectWithData(_:)
Decodes a previously-archived object graph, and returns the root object.
Declaration
@nonobjc class func unarchiveTopLevelObjectWithData(_ data: Data) throws -> Any?Parameters
- data:
An object graph previously encoded by Nskeyedarchiver.
Return Value
The unarchived object, or nil if an error occurred.
Discussion
This method throws an error if data does not contain valid keyed data.