Archives and serializations are two ways in which you can create architecture-independent byte streams of hierarchical data. Byte streams can then be written to a file or transmitted to another process, perhaps over a network. When the byte stream is decoded, the hierarchy is regenerated. Archives provide a detailed record of a collection of interrelated objects and values. Serializations record only the simple hierarchy of property-list values.
You should read this document to learn how to create and extract archived representations of object graphs.
This programming topic contains the following articles:
“Object Graphs” introduces the concept of an object graph and discusses the two techniques for turning objects into byte streams: archives and serializations.
“Archives” describes the different types of archive and archiver classes.
“Creating an Archive” describes how to create an archive.
“Decoding an Archive” describes how to decode an archive.
“Encoding and Decoding Objects” describes how to implement the methods that allow an object to be encoded in and decoded from archives.
“Encoding and Decoding C Data Types” describes how to encode and decode C data types that do not have convenience methods defined in the archive classes.
“Forward and Backward Compatibility for Keyed Archives” provides some tips on how to make your classes more compatible with previous and future versions of your classes in keyed archives.
“Legacy Support for Non-Keyed Archives” describes how to convert older classes to use keyed coding instead of non-keyed coding.
“Subclassing NSCoder” provides some tips on how to create your own coder classes.
“Serializations” discusses the behavior of serializations.
“Serializing Objects” describes how to create and read serializations.
© 2002, 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-02-04)