Instance Method

setClassName:forClass:

Sets a mapping for this archiver to encode instances of a given class with the provided name, rather than their real name.

Declaration

- (void)setClassName:(NSString *)codedName forClass:(Class)cls;

Parameters

codedName

The name of the class that the receiver uses uses in place of cls.

cls

The class for which to set up a translation mapping.

Discussion

When encoding, the receiver’s translation map overrides any translation that may also be present in the class’s map.

See Also

Managing Classes and Class Names

+ setClassName:forClass:

Sets a global translation mapping to encode instances of a given class with the provided name, rather than their real name.

+ classNameForClass:

Returns the class name with which the archiver class encodes instances of a given class.

- classNameForClass:

Returns the class name with which this archiver encodes instances of a given class.

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