<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuickLook",
  "identifier" : "/documentation/QuickLook/PreviewApplication/open(urls:selectedURL:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Quick Look"
    ],
    "preciseIdentifier" : "s:9QuickLook18PreviewApplicationC4open4urls11selectedURLAA0C7SessionVSay10Foundation0H0VG_AKSgtFZ"
  },
  "title" : "open(urls:selectedURL:)"
}
-->

# open(urls:selectedURL:)

Previews the provided URLs.

```
final class func open(urls: [URL], selectedURL: URL? = nil) -> PreviewSession
```

## Parameters

`urls`

An array of URLs to present in the new `PreviewApplication` scene.

`selectedURL`

If provided and in the array of passed URLs, the URL to select in the presented collection..

## Return Value

A `PreviewSession` instance.

## Discussion

This method launches the preview application with the provided URLs and, optionally, a selected URL.

---

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)