---
title: classForKeyedArchiver
framework: objectivec
role: symbol
role_heading: Instance Property
path: objectivec/nsobject-swift.class/classforkeyedarchiver
---

# classForKeyedArchiver

Subclasses to substitute a new class for instances during keyed archiving.

## Declaration

```swift
var classForKeyedArchiver: AnyClass? { get }
```

## Discussion

Discussion The object will be encoded as if it were a member of the class. This property is overridden by the encoder class and instance name to class encoding tables. If this property is nil, the result of this property is ignored.

## See Also

### Archiving

- [awakeAfter(using:)](objectivec/nsobject-swift.class/awakeafter(using:).md)
- [classForArchiver](objectivec/nsobject-swift.class/classforarchiver.md)
- [classForCoder](objectivec/nsobject-swift.class/classforcoder.md)
- [classFallbacksForKeyedArchiver()](objectivec/nsobject-swift.class/classfallbacksforkeyedarchiver().md)
- [classForKeyedUnarchiver()](objectivec/nsobject-swift.class/classforkeyedunarchiver().md)
- [replacementObject(for:)](objectivec/nsobject-swift.class/replacementobject(for:)-8ih2x.md)
- [replacementObject(for:)](objectivec/nsobject-swift.class/replacementobject(for:)-2l8ox.md)
- [replacementObject(for:)](objectivec/nsobject-swift.class/replacementobject(for:)-60vwc.md)
- [setVersion(_:)](objectivec/nsobject-swift.class/setversion(_:).md)
- [version()](objectivec/nsobject-swift.class/version().md)
