---
title: preferredMIMEType
framework: uniformtypeidentifiers
role: symbol
role_heading: Instance Property
path: uniformtypeidentifiers/uttype-swift.struct/preferredmimetype
---

# preferredMIMEType

The preferred MIME type for the type.

## Declaration

```swift
var preferredMIMEType: String? { get }
```

## Discussion

Discussion If available, the preferred (first available) tag of class mimeType. If not nil, the value of this property is the best available MIME type value for this type. The value of this property is equivalent to, but more efficient than: type.tags[.mimeType]?.first

## See Also

### Obtaining tags

- [preferredFilenameExtension](uniformtypeidentifiers/uttype-swift.struct/preferredfilenameextension.md)
- [tags](uniformtypeidentifiers/uttype-swift.struct/tags.md)
