<!--
{
  "availability" : [
    "iOS: 2.0.0 - 11.0.0",
    "iPadOS: 2.0.0 - 11.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "macOS: 10.0.0 - 10.13.0"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSUnarchiver/classNameDecoded(forArchiveClassName:)-swift.type.method",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSUnarchiver(cm)classNameDecodedForArchiveClassName:"
  },
  "title" : "classNameDecoded(forArchiveClassName:)"
}
-->

# classNameDecoded(forArchiveClassName:)

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

```
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:)`](/documentation/Foundation/NSUnarchiver/decodeClassName(_:asClassName:)-swift.type.method).

## Discussion

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)