<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "XCTest",
  "identifier" : "/documentation/XCTest/XCTAttachment/userInfo",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "XCTest"
    ],
    "preciseIdentifier" : "c:objc(cs)XCTAttachment(py)userInfo"
  },
  "title" : "userInfo"
}
-->

# userInfo

User-provided metadata associated with the attachment.

```
var userInfo: [AnyHashable : Any]? { get set }
```

## Discussion

Assign a custom dictionary to this property to store attachment-specific metadata along with the attachment.

> Note:
> The contents of the ``doc://com.apple.xctest/documentation/XCTest/XCTAttachment/userInfo`` dictionary are not represented in Xcode test reports.

---

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)