Instance Method

initRequiringSecureCoding:

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

Declaration

- (instancetype)initRequiringSecureCoding:(BOOL)requiresSecureCoding;

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 YES 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
- initForWritingWithMutableData:

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

Deprecated