---
title: "registerViewProviderClass(_:forFileType:)"
framework: uikit
role: symbol
role_heading: Type Method
path: "uikit/nstextattachment/registerviewproviderclass(_:forfiletype:)"
---

# registerViewProviderClass(_:forFileType:)

Registers a specific file type with the attachment view provider.

## Declaration

```swift
class func registerViewProviderClass(_ textAttachmentViewProviderClass: AnyClass, forFileType fileType: String)
```

## Parameters

- `textAttachmentViewProviderClass`: The text attachment view provider class.
- `fileType`: A doc://com.apple.documentation/documentation/Swift/String that represents the file type.

## See Also

### Convenience methods

- [textAttachmentViewProviderClass(forFileType:)](uikit/nstextattachment/textattachmentviewproviderclass(forfiletype:).md)
