<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuickLook",
  "identifier" : "/documentation/QuickLook/PreviewSession",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Quick Look"
    ],
    "preciseIdentifier" : "s:9QuickLook14PreviewSessionV"
  },
  "title" : "PreviewSession"
}
-->

# PreviewSession

A structure with which you can control an existing session and receive events for the current preview application.

```
struct PreviewSession
```

## Topics

### Instance Properties

[`var events: some AsyncSequence<PreviewSession.Event, Never>`](/documentation/QuickLook/PreviewSession/events)

An async sequence of preview session events.

### Instance Methods

[`func close() async throws`](/documentation/QuickLook/PreviewSession/close())

Closes the preview session.

### Enumerations

[`enum Event`](/documentation/QuickLook/PreviewSession/Event)

An event from the preview session’s events stream.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)