---
title: userInfo
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nserror/userinfo
---

# userInfo

The user info dictionary.

## Declaration

```swift
var userInfo: [String : Any] { get }
```

## Discussion

Discussion If the user info dictionary has not been set, this property is nil. On macOS 10.8 or later, if the user info dictionary has not been set, this property returns an empty dictionary.

## See Also

### Related Documentation

- [localizedDescription](foundation/nserror/localizeddescription.md)

### Getting Error Properties

- [code](foundation/nserror/code.md)
- [domain](foundation/nserror/domain.md)
