---
title: "CFErrorCopyUserInfo(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cferrorcopyuserinfo(_:)"
---

# CFErrorCopyUserInfo(_:)

Returns the user info dictionary for a given CFError.

## Declaration

```swift
func CFErrorCopyUserInfo(_ err: CFError!) -> CFDictionary!
```

## Parameters

- `err`: The error to examine. If this is not a valid CFError, the behavior is undefined.

## Return Value

Return Value A dictionary containing the same keys and values as in the userInfo dictionary err was created with. Returns an empty dictionary if NULL was supplied to the create function. Ownership follows the The Create Rule.

## See Also

### Getting Information About an Error

- [CFErrorGetDomain(_:)](corefoundation/cferrorgetdomain(_:).md)
- [CFErrorGetCode(_:)](corefoundation/cferrorgetcode(_:).md)
- [CFErrorCopyDescription(_:)](corefoundation/cferrorcopydescription(_:).md)
- [CFErrorCopyFailureReason(_:)](corefoundation/cferrorcopyfailurereason(_:).md)
- [CFErrorCopyRecoverySuggestion(_:)](corefoundation/cferrorcopyrecoverysuggestion(_:).md)
