---
title: "type(_:conformsToType:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsworkspace/type(_:conformstotype:)"
---

# type(_:conformsToType:)

Returns a Boolean indicating that the first Uniform Type Identifier (UTI) conforms to the second UTI.

## Declaration

```swift
func type(_ firstTypeName: String, conformsToType secondTypeName: String) -> Bool
```

## Parameters

- `firstTypeName`: A string containing the UTI that should conform to secondTypeName.
- `secondTypeName`: A string containing a UTI.

## Return Value

Return Value true if firstTypeName conforms to the UTI hierarchy of secondTypeName; otherwise, false.

## Discussion

Discussion Use this method instead of comparing UTIs for equality. See Uniform Type Identifiers Overview for information about UTI conformance. This method will always return true if the two strings are equal. Use this method with other type names, including those in the CFBundleTypeName keys of your app’s Info.plist file. You can safely call this method from any thread of your app.

## See Also

### Manipulating Uniform Type Identifier Information

- [type(ofFile:)](appkit/nsworkspace/type(offile:).md)
- [localizedDescription(forType:)](appkit/nsworkspace/localizeddescription(fortype:).md)
- [preferredFilenameExtension(forType:)](appkit/nsworkspace/preferredfilenameextension(fortype:).md)
- [filenameExtension(_:isValidForType:)](appkit/nsworkspace/filenameextension(_:isvalidfortype:).md)
