Encodes an object graph with the given root object into a data representation, optionally requiring secure coding.
Mac Catalyst 13.0+Beta
The root of the object graph to archive.
A Boolean value indicating whether all encoded objects must conform to NSSecureCoding.
On return, the error that occurred while encoding, or nil if no error occurred.
To prevent the possibility of encoding an object that NSKeyedUnarchiver can’t decode, set requiresSecureCoding to true whenever possible. This ensures that all encoded objects conform to NSSecureCoding.
Archives an object graph rooted at a given object to a file at a given path.
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.