Type Method

archivedDataWithRootObject:

Returns an NSData object containing the encoded form of the object graph whose root object is given.

Declaration

+ (NSData *)archivedDataWithRootObject:(id)rootObject;

Parameters

rootObject

The root of the object graph to archive.

Return Value

An NSData object containing the encoded form of the object graph whose root object is rootObject. The format of the archive is NSPropertyListBinaryFormat_v1_0.

See Also

Archiving Data

+ archiveRootObject:toFile:

Archives an object graph rooted at a given object by encoding it into a data object then atomically writes the resulting data object to a file at a given path, and returns a Boolean value that indicates whether the operation was successful.

Deprecated
- finishEncoding

Instructs the receiver to construct the final data stream.

outputFormat

The format in which the receiver encodes its data.

requiresSecureCoding

Indicates whether the receiver requires all archived 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