var allowsKeyedCoding: Bool
var delegate: (any NSKeyedArchiverDelegate)?
The archiver’s delegate.
var encodedData: Data
Returns the encoded data for the archiver.
var error: (any Error)?
var outputFormat: PropertyListSerialization.PropertyListFormat
The format in which the receiver encodes its data.
var requiresSecureCoding: Bool
Indicates whether the archiver requires all archived classes to conform to NSSecureCoding
.
var systemVersion: UInt32
func classNameForClass(AnyClass) -> String?
Returns the class name with which the archiver encodes instances of a given class.
func encode(Data)
func encode(Any?)
func encode(Bool, forKey: String)
Encodes a given Boolean value and associates it with a given key.
func encode(Double, forKey: String)
Encodes a given double value and associates it with a given key.
func encode(Float, forKey: String)
Encodes a given float value and associates it with a given key.
func encode(Int, forKey: String)
Encodes a given integer value and associates it with a given key.
func encode(Int32, forKey: String)
Encodes a given 32-bit integer value and associates it with a given key.
func encode(Int64, forKey: String)
Encodes a given 64-bit integer value and associates it with a given key.
func encode(Any?, forKey: String)
Encodes a given object and associates it with a given key.
func encodeBytes(UnsafePointer<UInt8>?, length: Int, forKey: String)
Encodes a given number of bytes from a given C array of bytes and associates them with the a given key.
func encodeConditionalObject(Any?)
func encodeConditionalObject(Any?, forKey: String)
Encodes a reference to a given object and associates it with a given key only if it has been unconditionally encoded elsewhere in the archive with encode(_:forKey:)
.
func encodePropertyList(Any)
func encodePropertyList(Any, forKey: String)
func encodeValue(ofObjCType: UnsafePointer<Int8>, at: UnsafeRawPointer)
func finishEncoding()
Instructs the archiver to construct the final data stream.
func setClassName(String?, for: AnyClass)
Adds a class translation mapping to NSKeyedArchiver
whereby instances of a given class are encoded with a given class name instead of their real class names.