One Logo Pool Ball
Foundation · IOS API REFERENCE

NSKeyedArchiver

class · SDK 27.1

class NSKeyedArchiver

Members (27)

static · iOS 2.0+ · Deprecated in iOS 12.0

archiveRootObject

TypeScript
static archiveRootObject(rootObject: unknown, path: string): boolean
Swift declaration
class func archiveRootObject(_ rootObject: Any, toFile path: String) -> Bool
static · iOS 2.0+ · Deprecated in iOS 12.0

archivedData

TypeScript
static archivedDataWithRootObject(rootObject: unknown): ArrayBuffer
Swift declaration
class func archivedData(withRootObject rootObject: Any) -> Data
static · iOS 11.0+

archivedData

TypeScript
static archivedDataWithRootObjectRequiringSecureCoding(object: unknown, requiresSecureCoding: boolean): ArrayBuffer
Swift declaration
class func archivedData(withRootObject object: Any, requiringSecureCoding requiresSecureCoding: Bool) throws -> Data
static

className

TypeScript
static classNameFor(cls: string): (string) | null
Swift declaration
class func className(for cls: AnyClass) -> String?
static

setClassName

TypeScript
static setClassNameFor(codedName: (string) | null, cls: string): void
Swift declaration
class func setClassName(_ codedName: String?, for cls: AnyClass)
method

className

TypeScript
classNameFor12199(cls: string): (string) | null
Swift declaration
func className(for cls: AnyClass) -> String?
method

encode

TypeScript
encodeForKey(value: boolean, key: string): void
Swift declaration
func encode(_ value: Bool, forKey key: String)
method

encodeBytes

TypeScript
encodeBytes(bytes: (SDKHandle) | null, length: number, key: string): void
Swift declaration
func encodeBytes(_ bytes: UnsafePointer<UInt8>?, length: Int, forKey key: String)
method

encodeConditionalObject

TypeScript
encodeConditionalObject(object: (unknown) | null, key: string): void
Swift declaration
func encodeConditionalObject(_ object: Any?, forKey key: String)
method

encode

TypeScript
encodeForKey45942(value: number, key: string): void
Swift declaration
func encode(_ value: Double, forKey key: String)
method

encode

TypeScript
encodeForKey74723(value: number, key: string): void
Swift declaration
func encode(_ value: Float, forKey key: String)
method

encode

TypeScript
encodeForKey98637(value: number, key: string): void
Swift declaration
func encode(_ value: Int32, forKey key: String)
method

encode

TypeScript
encodeForKey17290(value: number, key: string): void
Swift declaration
func encode(_ value: Int64, forKey key: String)
method

encode

TypeScript
encodeForKey92128(object: (unknown) | null, key: string): void
Swift declaration
func encode(_ object: Any?, forKey key: String)
method

finishEncoding

TypeScript
finishEncoding(): void
Swift declaration
func finishEncoding()
init · iOS 10.0+ · Deprecated in iOS 12.0

init

TypeScript
static init(): NSKeyedArchiver
Swift declaration
init()
init · iOS 2.0+ · Deprecated in iOS 12.0

init

TypeScript
static initForWritingWith(data: NSMutableData): NSKeyedArchiver
Swift declaration
init(forWritingWith data: NSMutableData)
init · iOS 11.0+

init

TypeScript
static initRequiringSecureCoding(requiresSecureCoding: boolean): NSKeyedArchiver
Swift declaration
init(requiringSecureCoding requiresSecureCoding: Bool)
method

setClassName

TypeScript
setClassNameFor75119(codedName: (string) | null, cls: string): void
Swift declaration
func setClassName(_ codedName: String?, for cls: AnyClass)
get

delegate

TypeScript
get delegate(): (SDKHandle) | null
Swift declaration
unowned(unsafe) var delegate: (any NSKeyedArchiverDelegate)? { get set }
set

delegate

TypeScript
set delegate(value: (Implements<NSKeyedArchiverDelegate> | SDKHandle) | null)
Swift declaration
unowned(unsafe) var delegate: (any NSKeyedArchiverDelegate)? { get set }
get · iOS 10.0+

encodedData

TypeScript
get encodedData(): ArrayBuffer
Swift declaration
var encodedData: Data { get }
get

outputFormat

TypeScript
get outputFormat(): PropertyListSerialization_PropertyListFormat
Swift declaration
var outputFormat: PropertyListSerialization.PropertyListFormat { get set }
set

outputFormat

TypeScript
set outputFormat(value: PropertyListSerialization_PropertyListFormat)
Swift declaration
var outputFormat: PropertyListSerialization.PropertyListFormat { get set }
get · iOS 6.0+

requiresSecureCoding

TypeScript
get requiresSecureCoding(): boolean
Swift declaration
var requiresSecureCoding: Bool { get set }
set · iOS 6.0+

requiresSecureCoding

TypeScript
set requiresSecureCoding(value: boolean)
Swift declaration
var requiresSecureCoding: Bool { get set }
method · iOS 9.0+

encodeEncodable

TypeScript
encodeEncodable(value: number, key: string): void
Swift declaration
@nonobjc func encodeEncodable<T>(_ value: T, forKey key: String) throws where T : Encodable

Encodes a given value and associates it with a key. If there's a problem encoding the value you supply, this method throws an error based on the type of problem: - The value fails to encode, or contains a nested value that fails to encode -- this method throws the corresponding error. - The value can't be encoded as a property list -- this method throws an `EncodingError.invalidValue` error. - Parameters: - value: The value to encode. - key: The key with which to associate the encoded value.

Skipped declarations

No declarations were skipped in this snapshot.

All Foundation types →