Open ClassFoundation5.9.0
NSKeyedUnarchiver
class NSKeyedUnarchiver
Superclasses
class NSCoder
The
NSCoder
abstract class declares the interface used by concrete subclasses to transfer objects and other values between memory and some other format. This capability provides the basis for archiving (where objects and data items are stored on disk) and distribution (where objects and data items are copied between different processes or threads). The concrete subclasses provided by Foundation for these purposes areNSKeyedArchiver
andNSKeyedUnarchiver
. Concrete subclasses ofNSCoder
are referred to in general as coder classes, and instances of these classes as coder objects (or simply coders). A coder object that can only encode values is referred to as an encoder object, and one that can only decode values as a decoder object.
Citizens in Foundation
Conformances
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol NSObjectProtocol
The
NSObjectProtocol
groups methods that are fundamental to all Foundation objects.
Members
init(forReadingFrom: Data
) throws static func unarchivedObject<DecodedObjectType>(ofClass: DecodedObjectType.Type, from: Data
) throws -> DecodedObjectType? static func unarchivedObject(ofClasses: [AnyClass], from: Data
) throws -> Any? class func `class`(forClassName: String
) -> AnyClass? class func setClass(AnyClass
?, forClassName: String) class func unarchiveTopLevelObjectWithData(Data
) throws -> Any? var allowedClasses: [AnyClass]?
var allowsKeyedCoding: Bool
var decodingFailurePolicy: NSCoder.DecodingFailurePolicy
var delegate: NSKeyedUnarchiverDelegate?
var error: Error?
var requiresSecureCoding: Bool
var systemVersion: UInt32
func `class`(forClassName: String
) -> AnyClass? func containsValue(forKey: String
) -> Bool func decodeBool(forKey: String
) -> Bool func decodeData(
) -> Data? func decodeDouble(forKey: String
) -> Double func decodeFloat(forKey: String
) -> Float func decodeInt32(forKey: String
) -> Int32 func decodeInt64(forKey: String
) -> Int64 func decodeInteger(forKey: String
) -> Int func decodeObject(
) -> Any? func decodeObject(forKey: String
) -> Any? func decodeObject<DecodedObjectType>(of: DecodedObjectType.Type, forKey: String
) -> DecodedObjectType? func decodeObject(of: [AnyClass]?, forKey: String
) -> Any? func decodePropertyList(
) -> Any? func decodePropertyList(forKey: String
) -> Any? func decodeValue(ofObjCType: UnsafePointer<Int8>, at: UnsafeMutableRawPointer
) func finishDecoding(
) Called when the caller has finished decoding.
func setClass(AnyClass
?, forClassName: String) func withDecodedUnsafeBytes<ResultType>(forKey: String, body: (UnsafeRawBufferPointer?) throws -> ResultType
) rethrows -> ResultType convenience init(forReadingWith: Data
) class func unarchiveObject(with: Data
) -> Any? class func unarchiveObject(withFile: String
) -> Any? func withDecodedUnsafeBufferPointer<ResultType>(forKey: String, body: (UnsafeBufferPointer<UInt8>?) throws -> ResultType
) rethrows -> ResultType