Initializer

init(forWritingWith:)

Initializes an archiver to encode data into a given a mutable-data object.

Declaration

init(forWritingWith data: NSMutableData)

Parameters

data

The mutable-data object into which the archive is written.

Discussion

When you finish encoding data, you must invoke finishEncoding() at which point data is filled. The format of the receiver is NSPropertyListBinaryFormat_v1_0.

See Also

Creating a Keyed Archiver

init(requiringSecureCoding: Bool)

Creates an archiver to encode data, and optionally disables secure coding.

init()

Initializes an archiver to encode data.

Deprecated