---
title: name
framework: xctest
role: symbol
role_heading: Instance Property
path: xctest/xctattachment/name
---

# name

The attachment’s name, or nil if the attachment is unnamed.

## Declaration

```swift
var name: String? { get set }
```

## Discussion

Discussion Set an attachment’s name property to a custom string to provide a descriptive name for the attachment within Xcode’s test reports.

## See Also

### Attachment Metadata

- [uniformTypeIdentifier](xctest/xctattachment/uniformtypeidentifier.md)
- [userInfo](xctest/xctattachment/userinfo.md)
