One Logo Pool Ball
Foundation · IOS API REFERENCE

PropertyListEncoder

class · iOS 8.0+ · SDK 27.1

class PropertyListEncoder

An object that encodes instances of data types to a property list.

Members (6)

get · iOS 8.0+

outputFormat

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

A value that determines which property list format is used during encoding.

set · iOS 8.0+

outputFormat

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

A value that determines which property list format is used during encoding.

method · iOS 8.0+

encode

TypeScript
encode(value: number): ArrayBuffer
Swift declaration
func encode<Value>(_ value: Value) throws -> Data where Value : Encodable

Returns a property list that represents an encoded version of the value you supply. - parameter value: The value to encode. - returns: A new `Data` value containing the encoded property list data. - throws: `EncodingError.invalidValue` if a non-conforming floating-point value is encountered during encoding, and the encoding strategy is `.throw`. - throws: An error if any value throws an error during encoding.

get · iOS 8.0+

userInfo

TypeScript
get userInfo(): NativeMap<SDKHandle, SDKHandle>
Swift declaration
@preconcurrency var userInfo: [CodingUserInfoKey : any Sendable] { get set }

A dictionary you use to customize the encoding process by providing contextual information.

set · iOS 8.0+

userInfo

TypeScript
set userInfo(value: NativeMap<SDKHandle, SDKHandle>)
Swift declaration
@preconcurrency var userInfo: [CodingUserInfoKey : any Sendable] { get set }

A dictionary you use to customize the encoding process by providing contextual information.

init · iOS 8.0+

init

TypeScript
static init(): PropertyListEncoder
Swift declaration
init()

Creates a new, reusable property list encoder with the default formatting settings.

Skipped declarations

2 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

PropertyListEncoder.encode(_:configuration:)

This declaration needs Swift generic type arguments. (no canonical witness for T)

PropertyListEncoder.encode(_:configuration:)

This declaration needs Swift generic type arguments. (no canonical witness for T)

All Foundation types →