The Spatial Preview framework lets macOS apps share and synchronize 2D and 3D content to Apple Vision Pro in real time, enabling users to view spatial photos, immersive video, PDFs, and USD scenes at full scale using Mac Virtual Display or a device picker.
• Unlocks spatial workflows from existing macOS apps without writing any visionOS code — QuickLook on Vision Pro handles display automatically
• Enables live two-way USD editing: changes made on either device (Mac or Vision Pro) are synchronized in real time, enabling collaborative 3D review sessions
• Supports a wide range of content types (spatial photos, Apple Immersive Video, PDFs, USD scenes) with automatic optimization for Vision Pro performance
A macOS SwiftUI app that launches an Apple Immersive Video frame on a connected Vision Pro and lets the user cycle through multiple renderings within the same QuickLook scene using DocumentPreviewSession.
import SwiftUI
import SpatialPreview
struct ContentView: View {
@State private var session: DocumentPreviewSession?
@State private var endpointObserver = ConnectedSpatialEndpointObserver()
@State private var showDevicePicker = false
@State private var selectedEndpoint: SpatialPreviewEndpoint?
let renderingURLs: [URL] = [
URL(fileURLWithPath: "/tmp/render_living_room.heic"),
URL(fileURLWithPath: "/tmp/render_kitchen.heic"),
URL(fileURLWithPath: "/tmp/render_bedroom.heic")
]
var body: some View {
VStack(spacing: 16) {
Text("Spatial Rendering Gallery")
.font(.title2)
.padding(.top)
Button("Launch on Vision Pro") {
Task { await startSession(with: renderingURLs[0]) }
}
.disabled(activeEndpoint == nil)
HStack {
ForEach(Array(renderingURLs.enumerated()), id: \.offset) { index, url in
Button("Render \(index + 1)") {
Task { await swapContent(to: url) }
}
.disabled(session == nil)
}
}
Button("Choose Device…") { showDevicePicker = true }
Button("Close Session") {
Task { await session?.close() }
session = nil
}
.disabled(session == nil)
}
.padding()
.sheet(isPresented: $showDevicePicker) {
SpatialPreviewDevicePicker(selectedEndpoint: $selectedEndpoint)
}
.task {
for await state in session?.stateUpdates ?? AsyncStream.never {
if case .invalidated = state { session = nil }
}
}
}
var activeEndpoint: SpatialPreviewEndpoint? {
selectedEndpoint ?? endpointObserver.endpoint
}
func startSession(with url: URL) async {
guard let endpoint = activeEndpoint else { return }
let newSession = DocumentPreviewSession(
documentType: .spatialImage,
name: "Architectural Renders"
)
do {
try await newSession.start(on: endpoint, contentsURL: url)
session = newSession
} catch {
print("Failed to start session: \(error)")
}
}
func swapContent(to url: URL) async {
do {
try await session?.updateContents(contentsURL: url)
} catch {
print("Failed to update contents: \(error)")
}
}
}
iOS 27 adds sectioned queries, codable model attributes, ResultsObserver for non-SwiftUI change observation, and HistoryObserver for reacting to persistent history changes in SwiftData.
USDKit is a new first-party Swift framework introduced in iOS/macOS 27 that brings native USD scene creation, composition, modification, and export capabilities to Apple platform apps, with deep RealityKit and Spatial Preview integration.
LiveCommunicationKit is the modern replacement for CXProvider that delivers rich, native conversation UIs integrated with the Lock Screen, Dynamic Island, Phone app Recents, and Siri. It provides a unified lifecycle model for audio and video conversations with a single delegate-driven action pipeline.
In-depth guide
RealityKit & USDKit in iOS 27 →Calling session.start() creates a new scene; use updateContents() to swap content in the same scene. Opting out of automatic USD optimization via .unmodified may throw an error if the scene is too complex. Spatial editable metadata must be explicitly set on USD prims for gesture-based manipulation on Vision Pro. USD export, annotations, and object manipulation are enabled by default but can be disabled via session options.
Requires Apple Vision Pro; Mac Virtual Display or local network proximity needed; complex USD scenes may be automatically optimized (mesh decimation, texture downsampling) which disables editability
The NowPlaying framework introduces a first-class Swift API for surfacing app media in system-wide now-playing surfaces — Lock Screen, Control Center, Dynamic Island, StandBy, CarPlay, Apple Watch, and Apple TV — via a declarative MediaSessionRepresentable protocol. It also supports remote media sessions (for controlling external speakers/TVs) and Media Sharing Extensions for routing media to third-party devices.