<!--
{
  "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.method",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSUnarchiver(im)classNameDecodedForArchiveClassName:"
  },
  "title" : "classNameDecoded(forArchiveClassName:)"
}
-->

# classNameDecoded(forArchiveClassName:)

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

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

## Parameters

`inArchiveName`

The ostensible name of a class in an archive.

## Return Value

The name of the class that will be used when instantiating objects whose ostensible class, according to the archived data, is `nameInArchive`. Returns `nameInArchive` unless a substitute name has been specified using the instance method (not the class method) [`decodeClassName(_:asClassName:)`](/documentation/Foundation/NSUnarchiver/decodeClassName(_:asClassName:)-swift.method).

## Discussion

---

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)