<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSError/userInfoValueProvider(forDomain:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSError(cm)userInfoValueProviderForDomain:"
  },
  "title" : "userInfoValueProvider(forDomain:)"
}
-->

# userInfoValueProvider(forDomain:)

Returns any user info provider specified for a given error domain.

```
class func userInfoValueProvider(forDomain errorDomain: String) -> (@Sendable (any Error, String) -> Any?)?
```

## Parameters

`errorDomain`

The error domain of the user info provider.

## Return Value

The user info provider of the error domain, or `nil` if none is specified.

---

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)