Type Method

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.

See Also

Unarchiving Data

class func unarchiveObject(withFile: String) -> Any?

Decodes and returns the object graph previously encoded by NSKeyedArchiver written to the file at a given path.

Deprecated
var requiresSecureCoding: Bool

Indicates whether the receiver requires all unarchived classes to conform to NSSecureCoding.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software