Contents

init(forReadingWith:)

Returns an NSUnarchiver object initialized to read an archive from a given data object.

Declaration

init?(forReadingWith data: Data)

Parameters

  • data:

    The archive data.

Return Value

An NSUnarchiver object initialized to read an archive from data. Returns nil if data is not a valid archive.

Discussion

The method decodes the system version number that was archived in data prepares the NSUnarchiver object for a subsequent invocation of decodeObject().

Raises an NSInvalidArgumentException if data is nil.

See Also

Related Documentation