Video hosted by Apple at devstreaming-cdn.apple.com

Configure player

Close

WWDC Index does not host video files

If you have access to video files, you can configure a URL pattern to be used in a video player.

URL pattern

preview

Use any of these variables in your URL pattern, the pattern is stored in your browsers' local storage.

$id
ID of session: tech-talks-111464
$eventId
ID of event: tech-talks
$eventContentId
ID of session without event part: 111464
$eventShortId
Shortened ID of event: tech-talks
$year
Year of session: 2026
$extension
Extension of original filename: mp4
$filenameAlmostEvery
Filename from "(Almost) Every..." gist: ...

SwiftUI & UI Frameworks 111464

Leverage multiple displays and scenes on iPhone Duo

2026 • iOS • 7:17

Discover how to build rich multi-window and multi-display experiences for iPhone Duo. Explore how to handle dynamic window sizes and request new scenes in side-by-side multitasking. Learn how to observe hinge angle changes in SwiftUI and UIKit to create interactive effects. And find out how to use scene accessories to present supplementary content across both displays simultaneously.

Speakers: Chris Donegan, Alex Muller

Open in Apple Developer site

Transcript

iPhone Duo is a groundbreaking new device offering unique capabilities while still feeling familiar. When people use your app, they expect it to feel at home on the device they’re using. Other videos in this series show how your app can have a first-class experience across devices. We’re going to show you how to take advantage of the unique features of iPhone Duo to make your app truly magical. I’m Chris Donegan, an engineering manager in UI Frameworks. And I’m Alex Muller, a system experience engineer.

You’ll learn how to respond to the hinge to drive amazing interactions and effects, support rich workflows with split view multitasking, and leverage scene accessories to show UI across multiple displays. Let’s open up with the hinge. Opening iPhone Duo is stunning. Notice how the wallpaper reacts to the angle of the hinge and applies a zoom effect.

Your app can respond to the hinges well. SwiftUI provides a new onHingeChange modifier, and UIKit provides UIHingeInteraction. Both give you access to the high-level hinge status of closed, partially open, and fully open. Beyond the discrete status, it provides continuous updates of the hinge angle. This is an app I’ve been working on. It has a playable guitar to level up my air guitar sessions.

I have an idea to use the hinge to drive a pitch bend like a whammy bar. This is my Instrument view. It has the pitch bend value as state, which is passed to the guitar view in the body. I’ll start my whammy feature by adding the onHingeChange modifier to the guitar view. This modifier takes a closure with two arguments: the previous hinge context and the current. In this case, I just need the current context.

Next, I check for a non-null hinge. A null value indicates the app is running on a device without a hinge. In addition to checking the availability, I’m also only interested in updates when iPhone Duo is partially open. I’ll make sure to add an else condition so the pitch bend is reset when the app is not reading the hinge angle. Finally, I’ll calculate the pitch bend using the angle and update the state. Using the onHingeChange modifier, my guitar app has a new level of expressivity.

Hinge data is observed live and is ideal for driving interactions or effects. For layout, use the arrangement and region APIs. Check out Strike a Pose with Adaptive Layouts on iPhone Duo for more. I’m really excited to see the creative ways in which apps use I think they’re really powerful. Absolutely. But iPhone Duo has so much more up its sleeve.

iPhone Duo brings powerful multitasking features that your app should be ready to handle. All apps participate in multitasking on iPhone Duo, where two apps can be placed in a side-by-side layout. If your app already supports resizing on iPad or iPhone mirroring, you’re off to a great start. iPhone Duo has a completely new layout, stacking video and apps together. Your app handles both of these layouts the same. The system makes supporting these layouts easy. It provides tools like size classes and scene geometry to use in your layout decisions. Follow best practices from “Prepare your app for iPhone Duo”.

iPhone Duo is the first iPhone to support multiple instances of your app’s UI. If your app supports this on iPad, it also will on iPhone Duo. There is one thing to keep in mind. On iPad, new windows can be created at any time. On the outer display of iPhone Duo, new windows cannot be created. That behavior is reserved for the inner display.

This dynamic availability is unique behavior to iPhone Duo. Make sure you handle errors when requesting new scenes. Use the UIWindowSceneActivation action, which automatically hides when new windows aren’t available. If you’re interested in adding support for multiple scenes for the first time, check out the documentation. Split-view multitasking is not the only way to get multiple scenes in your app. Scene accessories allow your app to show content on multiple displays at the same time.

For iPhone and iPad, scene accessories give your app the ability to pair additional content with your app’s main UI, like using your iPhone as a controller for a game on an external display. The system dynamically controls the availability of these accessories. They are enabled by default, but can be toggled at any time. Respond to changes of an accessory’s availability using observation tracking, so your app stays perfectly in sync as system conditions change.

New for camera apps on iPhone Duo, the CameraCaptureAccessory allows you to pair additional UI on the outer display, while your app’s main UI stays on the inner display. This lets you show content to a person while taking their photo or recording them. The camera capture accessory is available when your app is full screen on the inner display, and your app has an active camera session. Register your accessory on the same view as your camera UI. Learn more about the new camera features in “Build a great camera experience for iPhone Duo”.

To prepare for this talk, I’ve been building a camera app to help us practice. I want to show a teleprompter on the outer display to help us learn our lines. To get started, I use the SceneAccessory modifier to add a camera capture accessory. By adding the accessory on the camera view, the teleprompter will only be visible when the camera view is visible. And that’s all the code I need. Now, while the camera view is on the inner display, the teleprompter view is shown on the outer display. Next, I want to be able to practice from memory, and having a button to toggle the teleprompter would help.

I add a toolbar with a button that updates the enabled state of my teleprompter model, which is then given to the camera capture accessory. Next, I want to disable the toolbar button when the accessory is not available, like when the device is closed. Adding the onAvailabilityChange modifier to the camera capture accessory gives me a callback to observe this change. And now we have a full featured rehearsal app. takes advantage of both displays showing the teleprompter only if we need it.

Thanks for putting that together. It really helped me practice. [aside] You needed it. I hope we’ve sparked your creativity to make your app magical on iPhone Duo. Update your app to support split view multitasking, use the Hinge API to build impressive interactions and effects, and adopt scene accessories to have your app span multiple displays. And with that, we come to a close. Thanks so much for tuning in.