---
title: "init(name:contentType:)"
framework: spatialpreview
role: symbol
role_heading: Initializer
path: "spatialpreview/documentpreviewsession/init(name:contenttype:)"
---

# init(name:contentType:)

Create a new DocumentPreviewSession with the name and contentType, to be used for all content updates.

## Declaration

```swift
convenience init(name: String, contentType: UTType)
```
