---
title: "classNameEncoded(forTrueClassName:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsarchiver/classnameencoded(fortrueclassname:)"
---

# classNameEncoded(forTrueClassName:)

Returns the name of the class used to archive instances of the class with a given true name.

## Declaration

```swift
func classNameEncoded(forTrueClassName trueName: String) -> String?
```

## Parameters

- `trueName`: The real name of an encoded class.

## Return Value

Return Value The name of the class used to archive instances of the class trueName.

## See Also

### Substituting classes or objects

- [encodeClassName(_:intoClassName:)](foundation/nsarchiver/encodeclassname(_:intoclassname:).md)
- [replace(_:with:)](foundation/nsarchiver/replace(_:with:).md)
