---
title: "textAttachmentViewProviderClass(forFileType:)"
framework: appkit
role: symbol
role_heading: Type Method
path: "appkit/nstextattachment/textattachmentviewproviderclass(forfiletype:)"
---

# textAttachmentViewProviderClass(forFileType:)

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

## Declaration

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

## Parameters

- `fileType`: A doc://com.apple.documentation/documentation/Swift/String that represents the file type.

## Return Value

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

## See Also

### Convenience methods

- [registerViewProviderClass(_:forFileType:)](appkit/nstextattachment/registerviewproviderclass(_:forfiletype:).md)
