---
title: textTypes
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nsattributedstring/texttypes
---

# textTypes

An array of UTI strings that identify the file types that attributed strings support, either directly or through a user-installed filter service.

## Declaration

```swift
class var textTypes: [String] { get }
```

## Return Value

Return Value An array of NSString objects, each of which contains a UTI identifying a supported file type.

## Discussion

Discussion The returned list includes UTIs all file types supported by the receiver plus those that can be opened by the receiver after being converted by a user-installed filter service. You can use the returned UTI strings with any method that supports UTIs.

## See Also

### Getting the supported text-file formats

- [prefersRTFD(in:)](foundation/nsattributedstring/prefersrtfd(in:).md)
- [textUnfilteredTypes](foundation/nsattributedstring/textunfilteredtypes.md)
