Initializer

init(forReadingWith:)

Initializes the receiver for decoding an archive previously encoded by NSKeyedArchiver.

Declaration

init(forReadingWith data: Data)

Parameters

data

An archive previously encoded by NSKeyedArchiver.

Return Value

An NSKeyedUnarchiver object initialized for for decoding data.

Discussion

When you finish decoding data, you should invoke finishDecoding().

This method throws an exception if data is not a valid archive.