<!--
{
  "availability" : [
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextAttachment/textAttachmentViewProviderClass(forFileType:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTextAttachment(cm)textAttachmentViewProviderClassForFileType:"
  },
  "title" : "textAttachmentViewProviderClass(forFileType:)"
}
-->

# textAttachmentViewProviderClass(forFileType:)

Returns the text attachment view provider class, if any, for the file type you specify.

```
class func textAttachmentViewProviderClass(forFileType fileType: String) -> AnyClass?
```

## Parameters

`fileType`

A <doc://com.apple.documentation/documentation/Swift/String> that represents the file type.

## Return Value

The text attachment view provider class, or `nil` if the there is no class for the specified file type.

---

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)