<!--
{
  "documentType" : "article",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/keys-for-the-user-info-dictionary",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Keys for the user info dictionary"
}
-->

# Keys for the user info dictionary

Keys in the `userInfo` dictionary.

## Discussion

When you create a user info dictionary, at a minimum you should provide values for one of `kCFErrorLocalizedDescriptionKey` and `kCFErrorLocalizedFailureReasonKey`; ideally you should provide values for `kCFErrorLocalizedDescriptionKey`, `kCFErrorLocalizedFailureReasonKey`, and  `kCFErrorLocalizedRecoverySuggestionKey`. Typically, you should provide a value for one of either `kCFErrorURLKey` or `kCFErrorFilePathKey`.

## Topics

### Constants

[`let kCFErrorLocalizedDescriptionKey: CFString!`](/documentation/CoreFoundation/kCFErrorLocalizedDescriptionKey)

Key to identify the user-presentable description in the `userInfo` dictionary.

[`let kCFErrorLocalizedFailureReasonKey: CFString!`](/documentation/CoreFoundation/kCFErrorLocalizedFailureReasonKey)

Key to identify the user-presentable failure reason in the `userInfo` dictionary.

[`let kCFErrorLocalizedRecoverySuggestionKey: CFString!`](/documentation/CoreFoundation/kCFErrorLocalizedRecoverySuggestionKey)

Key to identify the user-presentable recovery suggestion in the `userInfo` dictionary.

[`let kCFErrorDescriptionKey: CFString!`](/documentation/CoreFoundation/kCFErrorDescriptionKey)

Key to identify the description in the `userInfo` dictionary.

[`let kCFErrorUnderlyingErrorKey: CFString!`](/documentation/CoreFoundation/kCFErrorUnderlyingErrorKey)

Key to identify the underlying error in the `userInfo` dictionary.

[`let kCFErrorURLKey: CFString!`](/documentation/CoreFoundation/kCFErrorURLKey)

Key to identify associated URL in the `userInfo` dictionary.

[`let kCFErrorFilePathKey: CFString!`](/documentation/CoreFoundation/kCFErrorFilePathKey)

Key to identify associated file path in the `userInfo` dictionary.



---

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)