iPhone Duo’s New Code: Six APIs Developers Have Not Used Before

Apple iPhone Duo Zoom app
Image: Apple

Apple’s iPhone Duo Tech Talk videos describe at least six pieces of code that do not exist on any other iPhone: a layout container built for a fold, a way to reserve space around the hinge and a camera, a hinge-angle sensor, a way to open a second window, a way to add controls to the outer display during a camera session, and a front camera that switches sides by itself. None of the six appear in the September 9 press release; they surface only in the videos and guidelines Apple wrote for programmers, not shoppers.

Apple iPhone Duo Slack app
A new layout container lets one app show a primary and secondary view split across the fold. Image: Apple

Key facts

New APIWhat it does
ArrangementView (SwiftUI) / UIArrangementViewController (UIKit)Lays out a primary and secondary view side by side or as an overlay across the fold
ReservedRegion / UIViewReservedRegionClaims space near the hinge or a camera so system and app content stop colliding with it
onHingeChange (SwiftUI) / UIHingeInteraction (UIKit)Reports whether the hinge is closed, partly open or fully open, plus a continuous angle
UIWindowSceneActivationRequests a second window, or instance, of the app’s interface, on the inner display only
CameraCaptureAccessory with .sceneAccessory()Shows extra controls on the outer display while the camera runs full screen on the inner one
Virtual Front Camera (AVCaptureDeviceDiscoverySession, position .front)Switches automatically between the outer camera and the under-display inner camera as the phone opens and closes
Apple iPhone Duo Netflix app
iPhone Duo is the first iPhone that can run a second window of the same app, though only on the inner display. Image: Apple

A layout container built specifically for a fold

ArrangementView and its UIKit counterpart, UIArrangementViewController, hold a primary and a secondary view and can present them split side by side or as an overlay, styled with arrangementViewStyle(.split) or (.overlay). An .axes(.horizontal) modifier restricts which direction the split can run, and an environment value called overlayArrangementZIndex lets a view respond when something else moves in front of it.

Apple iPhone Duo 48MP Fusion Main camera
A new camera API switches automatically between the outer and the under-display front camera. Image: Apple

Reserved regions keep content off the hinge and the camera

Apple’s videos describe two kinds of reserved regions: division regions, which mark where the hinge sits when the phone is folded, and occlusion regions, which mark where the under-display FaceTime camera sits. Both SwiftUI and UIKit can query them with a reservedRegions(kind:) call, with an includeInactive option for regions that are not currently in effect.

Don’t miss the best of The Mac Observer

Set us as a preferred source and our Apple reporting ranks higher in your Google Search results and Discover feed — one tap, no account changes.

Or get it by email
SwiftUI nameUIKit equivalent
onHingeChange modifierUIHingeInteraction
ArrangementViewUIArrangementViewController
ReservedRegionUIViewReservedRegion
GeometryReader with reservedRegions(kind:)view.reservedRegions(kind:)

A hinge sensor most iPhones never needed

onHingeChange in SwiftUI and UIHingeInteraction in UIKit report a continuous hinge angle, which Apple frames as a tool for live interactive effects, its own example is a pitch-bend control tied to how far the phone is folded, rather than for layout. Apple’s guidance is explicit that layout decisions should use the arrangement and reserved-region APIs instead of reading the hinge angle directly.

A second window, and a camera that knows which way it is facing

UIWindowSceneActivation lets an app request a second window, and Apple calls iPhone Duo the first iPhone able to run multiple instances of one app’s interface at once, though new windows can only open on the inner display, never the outer one. On the camera side, the Virtual Front Camera automatically hands off between the outer camera and the under-display inner camera as the phone opens and closes, paired with an AVCaptureDeviceDirectionCoordinator that tracks which physical camera is currently facing the user.

What Apple has not said

  • No public release date for the Xcode 27.1 beta, so none of these six APIs can be tested outside Apple’s own labs yet.
  • No statement on what an app that ignores all six does differently from one that adopts them, beyond running at its existing iPhone size.
  • No App Store requirement tied to adopting any of them ahead of the October 23 launch.

Compare what these six additions change against iPhone Duo’s camera hardware and against iPhone 18 Pro’s own camera system, which has no equivalent APIs because it has no fold, no hinge and one front camera instead of two.