Instance Method

initForReadingWithData:

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

Declaration

- (instancetype)initForReadingWithData:(NSData *)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.