Decodes a buffer of data that was previously encoded with encode
and associated with the string key
.
SDKs
- iOS 2.0+
- macOS 10.2+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
func decodeBytes(forKey key: String, returnedLength lengthp: Unsafe Mutable Pointer<Int>?) -> Unsafe Pointer<UInt8>?
Discussion
The buffer’s length is returned by reference in lengthp
. The returned bytes are immutable. Subclasses must override this method if they perform keyed coding.