---
title: "decodeDictionary(withKeyClass:objectClass:forKey:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nscoder/decodedictionary(withkeyclass:objectclass:forkey:)"
---

# decodeDictionary(withKeyClass:objectClass:forKey:)

## Declaration

```swift
@nonobjc func decodeDictionary<DecodedKey, DecodedObject>(withKeyClass keyClass: DecodedKey.Type, objectClass: DecodedObject.Type, forKey key: String) -> [DecodedKey : DecodedObject]? where DecodedKey : NSObject, DecodedKey : NSCopying, DecodedKey : NSSecureCoding, DecodedObject : NSObject, DecodedObject : NSSecureCoding
```
