<!--
{
  "availability" : [
    "macOS: 27.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "SpatialPreview",
  "identifier" : "/documentation/SpatialPreview/DocumentPreviewSession/init(name:contentType:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Spatial Preview"
    ],
    "preciseIdentifier" : "s:14SpatialPreview08DocumentB7SessionC4name11contentTypeACSS_07UniformG11Identifiers6UTTypeVtcfc"
  },
  "title" : "init(name:contentType:)"
}
-->

# init(name:contentType:)

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

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

---

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)