---
title: close()
framework: Quick Look
role: symbol
role_heading: Instance Method
platforms: [visionOS 2.0+]
path: quicklook/previewsession/close()
---

# close()

Closes the preview session.

## Declaration

```swift
func close() async throws
```

## Discussion

Discussion If the existing session is still open, this method closes it. The session’s events stream receives a .didClose event upon success. note: An Error if it is not possible to close the PreviewSession.
