Initializer

init(requiringSecureCoding:)

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

Declaration

init(requiringSecureCoding requiresSecureCoding: Bool)

Parameters

requiresSecureCoding

A Boolean value indicating whether all encoded objects must conform to NSSecureCoding.

Discussion

To prevent the possibility of encoding an object that NSKeyedUnarchiver can’t decode, set requiresSecureCoding to true whenever possible. This ensures that all encoded objects conform to NSSecureCoding.

See Also

Creating a Keyed Archiver

init()

Initializes an archiver to encode data.

Deprecated
init(forWritingWith: NSMutableData)

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

Deprecated