---
title: "init(contentType:)"
framework: corespotlight
role: symbol
role_heading: Initializer
path: "corespotlight/cssearchableitemattributeset/init(contenttype:)"
---

# init(contentType:)

Creates an attribute set for the specified content type.

## Declaration

```swift
init(contentType: UTType)
```

## Parameters

- `contentType`: The type of the content. For example, doc://com.apple.documentation/documentation/UniformTypeIdentifiers/UTType-swift.struct/png or doc://com.apple.documentation/documentation/UniformTypeIdentifiers/UTType-swift.struct/movie.

## Return Value

Return Value An attribute set that represents an item of the specified content type.

## See Also

### Creating an attribute set

- [init(coder:)](corespotlight/cssearchableitemattributeset/init(coder:).md)
