<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UniformTypeIdentifiers",
  "identifier" : "/documentation/UniformTypeIdentifiers/UTTypeReference/init(filenameExtension:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Uniform Type Identifiers"
    ],
    "preciseIdentifier" : "c:objc(cs)UTType(cm)typeWithFilenameExtension:"
  },
  "title" : "init(filenameExtension:)"
}
-->

# init(filenameExtension:)

Creates a type that represents the specified filename extension.

```
convenience init?(filenameExtension: String)
```

## Parameters

`filenameExtension`

The filename extension.

## Discussion

If the system recognizes the filename extension, the intializer returns the corresponding type; otherwise, the initializer returns a dynamic type whose [`isDeclared`](/documentation/UniformTypeIdentifiers/UTType-swift.struct/isDeclared) and [`isPublic`](/documentation/UniformTypeIdentifiers/UTType-swift.struct/isPublic) properties are both set to <doc://com.apple.documentation/documentation/Swift/false>.

---

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)