Instance Property


The encoded data for the archiver.


@property(readonly, strong) NSData *encodedData;


If encoding has not yet finished, invoking this property calls finishEncoding and populates this property with the encoded data. If you initialized the keyed archiver with initForWritingWithMutableData: and a specific mutable data instance, this property contains that instance.

See Also

Archiving Data

+ archivedDataWithRootObject:requiringSecureCoding:error:

Encodes an object graph with the given root object into a data representation, optionally requiring secure coding.

- finishEncoding

Instructs the receiver to construct the final data stream.


The format in which the receiver encodes its data.


Indicates whether the archiver requires all archived classes to resist object substitution attacks.

+ archivedDataWithRootObject:

Returns a data object that contains the encoded form of the object graph formed by the given root object.

+ archiveRootObject:toFile:

Archives an object graph rooted at a given object to a file at a given path.