Archives a given object along with all the objects to which it is connected.
- macOS 10.0–10.13Deprecated
The root object of the object graph to archive.
If any object is encountered more than once while traversing the graph, it is encoded only once, but the multiple references to it are stored. (See Archives and Serializations Programming Guide for more information.)
This message must not be sent more than once to a given
NSArchiver object; an
NSInvalid is raised if a root object has already been encoded. If you need to encode multiple object graphs, therefore, don’t attempt to reuse an
NSArchiver instance; instead, create a new one for each graph.