This is the third post in the series about post-launch iOS 27 news. The two prior covered the Xcode 27 Agent Skills and Device Hub. This one covers what’s most urgent for anyone planning day-one iPhone Duo support.
Xcode 27.1 beta shipped on September 18 (9to5Mac, MacRumors, AppleInsider) — five weeks before hardware ships on October 23. Requires an Apple silicon Mac running macOS 26.6 or later. Ships the iOS 27.1 SDK and a simulator that reproduces the foldable’s poses: open, closed, rotated, partially folded.
The SDK exposes 6 foldable-specific APIs that solve the concrete problems that appear when an app has to live with a hinge in the middle. Let’s go through them (ecorpit — iPhone Duo SDK, sunyazhou — Adapting Apps to iPhone Duo).
1. Hinge API — knowing how the device is folded
SwiftUI: onHingeChange. UIKit: UIHingeInteraction. Both give you two things: a discrete state (.closed, .partiallyOpen, .fullyOpen) and a continuous angle.
.onHingeChange { _, newContext in
if let hinge = newContext.hinge, hinge.status == .partiallyOpen {
bend = hinge.angle.degrees
} else {
bend = 0
}
}
Note: newContext.hinge is optional. If it’s nil, the device has no folding capability — that’s how you distinguish regular iPhones from Duo with the same code.
In UIKit, UIHingeInteraction takes an update handler that receives a UIHinge. The status adds .unknown on top of SwiftUI’s three (Apple recommends treating it as .fullyOpen defensively). The angle is in radians, not degrees.
What NOT to use it for: layout decisions. Apple is explicit: the hinge API is for “interactions and effects” — animations that respond to the angle, subtle feedback when the user folds the device. For accommodating layout use Reserved Regions and Arrangement Views (next sections).
2. Reserved Regions — where you CAN’T put content
Neither the fold nor the Duo’s front cameras are transparent. The fold splits a large view into two visually separate areas; the front cameras cover screen regions. Reserved Regions tells you where those zones are so you can avoid them or adapt.
SwiftUI: GeometryProxy.reservedRegions(kind:options:layoutDirectionBehavior:).
UIKit: UIView.reservedRegions(kind:options:) returns UIView.ReservedRegion values.
Two kinds:
.division— the fold splits a large view into two..occlusion— hardware (front cameras) covers content.
Each region has frame, margins, kind, identifier, and — critically — isActive. The fold region is isActive: true when the device is .partiallyOpen; false when it’s .fullyOpen. The inner camera region is isActive: true only when the camera is in use.
GeometryReader { proxy in
let divisions = proxy.reservedRegions(kind: .division, options: .includeInactive)
PhotoGrid(columns: divisions.isEmpty ? 3 : 4)
}
In that example, if it detects a division region (meaning the app runs on Duo with fold potential), it paints 4 columns so the layout makes sense on both sides of the fold. On a regular iPhone, divisions is empty and it uses 3.
Why includeInactive matters: if the user opens the Duo while your app is running, you want the layout to already be prepared for the fold — not reflow abruptly when the region shows up. You render assuming the region could become active.
3. Arrangement Views — layouts that span the fold
When your app runs with the Duo open, it often makes sense to show two views: master on one side, detail on the other. Before we’d use NavigationSplitView for that, but it behaved poorly on foldables. ArrangementView is the dedicated API.
ArrangementView { PrimaryView() } secondary: { SecondaryView() }
.arrangementViewStyle(.split.axes(.horizontal))
Two base styles: .split (side-by-side when the device is wider than tall, stacked with primary on top when taller than wide) and .overlay (primary over secondary when there’s no active division; splits at the fold when the device opens partially). The default .automatic resolves to .split in most cases.
UIKit: UIArrangementViewController with updateArrangement(_:animated:). Same styles, different ergonomics.
The .axes(.horizontal) forces horizontal division always — useful when the layout only makes semantic sense side-by-side (a comparison app, for example).
4. Vertical Toolbars & Tab Bars — when the device opens, bars rotate
When the Duo is open, the effective orientation changes. Horizontal toolbars and tab bars from the compact layout feel out of place. iOS 27.1 rotates them automatically to vertical unless you configure otherwise.
Opt-out (keep horizontal always):
- SwiftUI:
.toolbarVerticalBehavior(.disabled) - UIKit: override
preferredVerticalBarBehaviorto return.disabled
Icon rule: vertical bars require icons; horizontal bars prefer icons but accept titles. Text-only items stay horizontal even if the rest rotates. Practical detail: if your app has text-only toolbar items, the Duo migration looks odd — worth adding SF Symbols.
Custom opt-in per item:
.toolbar {
ToolbarItem { ZoomSlider() }
.axisBehavior(.verticalPreferred)
}
axisBehavior values: .automatic, .horizontalOnly, .verticalPreferred. To read which edge the bar is currently on:
- SwiftUI: environment
toolbarVerticalEdge - UIKit: trait
verticalBarEdge
5. Direction-Aware Cameras — two front cameras, two API paths
The Duo has two front cameras: one on the outer display and one under the inner display. There are two ways to handle it:
Compatible mode: virtual front camera. If your code uses .builtInWideAngleCamera or .builtInUltraWideCamera at .front position, iOS automatically picks between the two physical ones based on which display faces the user. Zero changes to your app.
Explicit mode: individual cameras (new).
.builtInOuterUltraWideCamera— up to 4K, 120 fps..builtInInnerUltraWideCamera— 1080p, 60 fps. It’s the first under-display camera on an iPhone.
To know which one is facing forward at any moment, use AVCaptureDeviceDirectionCoordinator:
let coordinator = AVCaptureDeviceDirectionCoordinator(
view: previewView,
deviceTypes: [.builtInOuterUltraWideCamera, .builtInInnerUltraWideCamera],
changeHandler: { directions in
updateCameraChoice(
forward: directions.forwardFacingDeviceDescriptors,
backward: directions.backwardFacingDeviceDescriptors
)
}
)
Updates every time the device opens, closes, or rotates.
Careful with mirroring: if you’re managing individual cameras, set automaticallyAdjustsVideoMirroring = false and decide isVideoMirrored from the direction map, not from device position. Leave the auto and the mirror flips when it shouldn’t.
6. Camera Capture Accessory — content on the outer display
This is the most creative of the 6. When the device is open, you can show content on the outer display (visible to the person being photographed) while the user captures from the inner display (the composition view).
SwiftUI: sceneAccessory(content:) with CameraCaptureAccessory inside.
UIKit: UISceneAccessory.cameraCapture(sceneConfiguration:userInfo:), registered on the view controller with registerSceneAccessory(_:).
The accessory has isAvailable (varies by whether the device is open/closed) and isEnabled (app opt-in). It tears down on its own when capture stops, the app goes to background, or the user closes the device.
Obvious use case: portrait or video-selfie apps where the subject wants to see how they’ll look while being posed.
Simulator limitation — an elephant in the room
The Duo simulator does NOT simulate cameras. You can test layout with ArrangementView, adapt to .reservedRegions, and vertical toolbar behavior — that all works. But any flow involving AVCaptureDeviceDirectionCoordinator, virtual front camera, individual cameras, or the CameraCaptureAccessory requires real hardware.
With the device shipping October 23 at $1,999 USD, that means definitive testing of camera features runs through hardware you probably won’t have until November. Plan the sprint accordingly: first integration is “structural” (everything else), second is “camera” (once the device arrives).
Concrete timeline
- Sep 18, 2026 — Xcode 27.1 beta shipped (yesterday). Download from Apple Developer Downloads if you’ll support Duo.
- Oct 16, 2026 — iPhone Duo preorders open.
- Oct 23, 2026 — shipping starts. Running iOS 27.1 public.
Five weeks is tight but enough for the first 4 APIs (layout, hinge, arrangement, toolbars). Camera work waits for hardware.
What to prioritize before October 23
If your app doesn’t do camera work: focus on Reserved Regions and Arrangement Views. Those cover 90% of “my app looks reasonable on Duo.” Hinge API is optional — use it if your app has an animated component that gains from reacting to the angle.
If your app does do camera work: add AVCaptureDeviceDirectionCoordinator now, even though you can’t test it — the code will be ready when hardware arrives. And evaluate whether your app benefits from CameraCaptureAccessory (showing on the outer display while capturing from the inner).
If your app doesn’t plan to support Duo actively: at least compile against iOS 27 SDK. Without code changes, your app runs on Duo — but it looks like a stretched-out regular iPhone on the big canvas, without taking advantage. That’s the minimum acceptable. The launch post covered the rest.
Closing the series
That’s the three post-launch posts:
- Xcode 27 Agent Skills — changes how you write code today.
- Device Hub — changes how you test your app on simulator and hardware.
- Now: iPhone Duo with Xcode 27.1 — changes which APIs you need before October 23.
The underlying pattern is the same: Apple is building a stack where your app runs on more devices, with more surfaces, and with more interaction modes (voice, agents, cameras). This week’s three changes push in that direction.
Sources
- Apple Releases Xcode 27.1 Beta With iPhone Duo Support — MacRumors
- Apple releases Xcode 27.1 beta, enabling iPhone Duo app development — 9to5Mac
- Xcode 27.1 beta adds iPhone Duo development tools — AppleInsider
- iPhone Duo SDK: New iOS 27.1 APIs — ecorpit
- Adapting Apps to iPhone Duo in iOS 27 — sunyazhou
- iPhone Duo’s iOS 27 Is Different: 6 Features Built for a Foldable iPhone — TechRepublic
- Get your in-app messages ready for iPhone Duo — Pushwoosh
- Xcode 27.1 Beta With iPhone Duo Simulator — Pillitteri