<!--
{
  "availability" : [
    "macOS: 10.5.0 - 12.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWorkspace/type(_:conformsToType:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWorkspace(im)type:conformsToType:"
  },
  "title" : "type(_:conformsToType:)"
}
-->

# type(_:conformsToType:)

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

```
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

<doc://com.apple.documentation/documentation/Swift/true> if `firstTypeName` conforms to the UTI hierarchy of `secondTypeName`; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

Use this method instead of comparing UTIs for equality. See [Uniform Type Identifiers Overview](https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_intro/understand_utis_intro.html#//apple_ref/doc/uid/TP40001319) for information about UTI conformance.

This method will always return <doc://com.apple.documentation/documentation/Swift/true> if the two strings are equal. Use this method with other type names, including those in the <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/CFBundleDocumentTypes/CFBundleTypeName> keys of your app’s `Info.plist` file.

You can safely call this method from any thread of your app.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)