Instance Method

encodeConditionalObject:forKey:

Encodes a reference to a given object and associates it with a key only if it has been unconditionally encoded elsewhere in the archive.

Declaration

- (void)encodeConditionalObject:(id)object forKey:(NSString *)key;

Parameters

objv

The object to encode.

key

The key with which to associate the encoded value. This value must not be nil.

Discussion

This method is effective only if you’ve previously archived this object with this key by calling encodeInt:forKey:.

See Also

Encoding Data and Objects

- encodeBool:forKey:

Encodes a given Boolean value and associates it with a key.

- encodeBytes:length:forKey:

Encodes a given number of bytes from a given C array of bytes and associates them with a key.

- encodeDouble:forKey:

Encodes a given double value and associates it with a key.

- encodeFloat:forKey:

Encodes a given float value and associates it with a key.

- encodeInt:forKey:

Encodes a given int value and associates it with a key.

- encodeInt32:forKey:

Encodes a given 32-bit integer value and associates it with a key.

- encodeInt64:forKey:

Encodes a given 64-bit integer value and associates it with a key.

- encodeObject:forKey:

Encodes a given object and associates it with a given key.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software