requiresSecureCoding
Indicates whether the receiver requires all unarchived classes to conform to Nssecurecoding.
Declaration
var requiresSecureCoding: Bool { get set }Parameters
- flag:
True if the receiver requires Nssecurecoding; False if not.
Discussion
If you set the receiver to require secure coding, it will throw an exception if you attempt to unarchive a class which does not conform to NSSecureCoding.
The secure coding requirement for NSKeyedUnarchiver is designed to be set once at the top level and remain on. Once enabled, attempting to call setRequiresSecureCoding: with a value of false will throw an exception. This is to prevent classes from selectively turning secure coding off.
Note that the getter is on the superclass, NSCoder. See NSCoder for more information about secure coding.