New features in Apple’s Quick Look for visionOS 2

Using this code, when the user taps on a file, it opens in a new window in the visionOS workspace. If the file contains video, the video begins playing automatically.

By passing an array of URLs in the .selectedURL parameter instead of a single URL, you can allow the user to preview multiple items in a Collection View Quick Look window.

You can also specify whether or not to display a preview editing tab so the user can make edits to the item being previewed by setting the editingMode: parameter to .enabled. You can also change the current title of the item being previewed.