---
title: allowsKeyedCoding
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nscoder/allowskeyedcoding
---

# allowsKeyedCoding

A Boolean value that indicates whether the receiver supports keyed coding of objects.

## Declaration

```swift
var allowsKeyedCoding: Bool { get }
```

## Discussion

Discussion false by default. Concrete subclasses that support keyed coding, such as NSKeyedArchiver, need to override this property to return true.

## See Also

### Related Documentation

- [Archives and Serializations Programming Guide](apple-archive/documentation/Cocoa/Conceptual/Archiving.md)

### Inspecting a Coder

- [containsValue(forKey:)](foundation/nscoder/containsvalue(forkey:).md)
- [decodingFailurePolicy](foundation/nscoder/decodingfailurepolicy-swift.property.md)
- [NSCoder.DecodingFailurePolicy](foundation/nscoder/decodingfailurepolicy-swift.enum.md)
