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

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