2025 Audio & VideoBusiness & EducationDesignGraphics & GamesPhotos & CameraSafari & WebSwiftUI & UI FrameworksSpatial Computing
WWDC25 · 39 min · Audio & Video / Business & Education / Design / Graphics & Games / Photos & Camera / Safari & Web / SwiftUI & UI Frameworks / Spatial Computing
What’s new in visionOS 26
Explore exciting new features in visionOS 26. Discover enhanced volumetric APIs and learn how you can combine the power of SwiftUI, RealityKit and ARKit. Find out how you can build more engaging apps and games using faster hand tracking and input from spatial accessories. Get a sneak peek at updates to SharePlay, Compositor Services, immersive media, spatial web, Enterprise APIs, and much more.
Watch at developer.apple.com ↗Chapters
Code shown on screen · 10 snippets
DepthAlignment
// Layout types back align views by default
struct LandmarkProfile: View {
var body: some View {
VStackLayout().depthAlignment(.front) {
ResizableLandmarkModel()
LandmarkNameCard()
}
}
} rotation3DLayout
// Rotate using any axis or angle
struct PlaneStack: View {
var body: some View {
VStack {
ToyPlaneModel()
ToyPlaneModel()
.rotation3DLayout(angle, axis: .z)
ToyPlaneModel()
}
}
} Dynamic Bounds Restrictions
// Dynamic Bounds Restrictions
struct ContentView: View, Animatable {
var body: some View {
VStackLayout().depthAlignment(.front) {
// . . .
}
.preferredWindowClippingMargins(.all, 400)
}
} Model3D manipulable view modifier
// Apply the manipulable view modifier to each Model3D block per 3D object
struct RockView: View {
var body: some View {
RockLayout {
ForEach(rocks) { rock in
Model3D(named: rock.name, bundle: realityKitContentBundle) {
model in
model.model?
.resizable()
.scaledToFit3D()
}
.manipulable()
}
}
}
} ManipulationComponent
// Add a ManipulationComponent to each entity in your scene
struct RealityKitObjectManipulation: View {
var body: some View {
RealityView {ccontent in
let rocks = await loadRockEntities()
arrangeRocks(rocks)
for rock in rocks {
ManipulationComponent.configureEntity(rock)
content.add(rock)
}
}
}
} QuickLook3DView
// Preview multiple 3D models simultaneously in your space with Quick Look and
// get object manipulation on each of them by default
struct QuickLook3DView: View {
let url: URL
var body: some View {
VStack {
Button("View in your space") {
_ = PreviewApplication.open(urls: [url])
}
}
}
} Gestures on entities
// Gestures on entities
struct GestureExample: View {
private var dragMountain: Float = 0
private var dragTerrain: Float = 0
var body: some View {
RealityView { content in
let drag1 = GestureComponent(
DragGesture().updating($dragMountain) { value, offset, _ in
offset = Float(value.translation.width)
})
let drag2 = GestureComponent(
DragGesture().updating($dragTerrain) {evalue, offset, _ in
offset = Float(value.translation.width)
})
mountain.components.set(drag1)
terrain.components.set(drag2)
} update: { content in
// . . .
}
}
} Attachments on entities
// Attachments on entities
struct AttachmentComponentExample: View {
var body: some View {
RealityView { content in
// ... Load the mountain entity
// Create an AttachmentComponent with any SwiftUI View
let attachmentComponent = ViewAttachmentComponent(
rootView: NameSign()
)
mountain.components.set(attachmentComponent)
}
}
} SwiftUI restoration APIs
var body: some Scene {
// . . .
WindowGroup(id: "Editor") {
EditorView()
}
Window("Inspector", id: "Inspector") {
InspectorView()
}
// Prevent the inspector window from being launched on its own without an
// editor window present.
.defaultLaunchBehavior(.suppressed)
// Prevent the inspector window from being persisted and restored across
// different process or boot sessions.
.restorationBehavior(.disabled)
} Look to scroll
// SwiftUI
var body: some View {
ScrollView {
HikeDetails()
}
.scrollInputBehavior(.enabled, for: .look)
}
// UIKit
let scrollView: UIScrollView = {
let scroll = UIScrollView()
scroll.lookToScrollAxes = .vertical
return scroll
}() Resources
Related sessions
-
25 min -
26 min -
26 min -
20 min -
25 min -
30 min -
23 min -
31 min -
18 min -
19 min -
23 min -
26 min -
26 min -
20 min -
15 min -
29 min -
26 min