Contents

classNameDecoded(forArchiveClassName:)

Returns the name of the class used when instantiating objects whose ostensible class, according to the archived data, is a given name.

Declaration

class func classNameDecoded(forArchiveClassName inArchiveName: String) -> String

Parameters

  • inArchiveName:

    The name of a class.

Return Value

The name of the class used when instantiating objects whose ostensible class, according to the archived data, is nameInArchive. Returns nameInArchive if no substitute name has been specified using the class method (not the instance method) decodeClassName(_:asClassName:).

Discussion

Note that each individual instance of NSUnarchiver can be given its own class name mappings by invoking the instance method decodeClassName(_:asClassName:). The NSUnarchiver class has no information about these instance-specific mappings, however, so they don’t affect the return value of classNameDecoded(forArchiveClassName:).

See Also

Substituting classes or objects