Instance Method

decodeTopLevelObjectAndReturnError:

Decodes a previously-encoded object, populating an error if decoding fails.

Declaration

- (id)decodeTopLevelObjectAndReturnError:(NSError * _Nullable *)error;

Parameters

error

An NSError reference. On return, if this value is not nil, it represents an error encountered while decoding.

Return Value

The decoded object, or nil if decoding fails.

See Also

Decoding Top-Level Objects

- decodeTopLevelObjectOfClass:forKey:error:

Decode an object as an expected type, failing if the archived type does not match.

- decodeTopLevelObjectOfClasses:forKey:error:

Decode an object as one of several expected types, failing if the archived type does not match.

- decodeTopLevelObjectForKey:error:

Decodes the previously-encoded object associated by a key, populating an error if decoding fails.