SwiftUI is the best-supported way to build for iPhone Duo. Declarative layout already recomputes when the available size changes, so a SwiftUI app that avoids fixed sizes gets much of the adaptation for free.
What you get without changes
Build against the iOS 27.1 SDK and the following already adapt: NavigationSplitView, TabView, sheets, popovers, context menus, and alerts. Columns collapse when the device is closed and tile or overlay when it is open. Standard navigation and toolbar buttons move into a vertical bar on the inner display in landscape.
What you need to change
The work concentrates in four places:
- Fixed sizes. Any
.frame(width:)tuned for a 402-point iPhone is wrong on a 626-point display. See hard-coded screen dimensions. - Orientation logic. The inner display does not honor supported interface orientations. Move to
@Environment(\.horizontalSizeClass). See size classes. - Safe area math. Insets are asymmetric now. See asymmetric safe areas.
- Toolbar content. A vertical bar holds fewer items. See overflow priorities.
The new APIs worth adopting
ArrangementView is the highest-value addition — it places a primary and secondary view across every pose, taking size classes, aspect ratio, and active division regions as input:
ArrangementView {
PlayerView()
} secondary: {
UpNextView()
}
.arrangementViewStyle(.split)
ReservedRegion reports where the hinge divides the display and where the under-display camera occludes it:
GeometryReader { proxy in
let regions = proxy.reservedRegions(kind: .division)
}
And one modifier that is close to free:
TabView { … }.defaultTabBarPlacement(.sidebar)
Read the full walkthrough in SwiftUI on iPhone Duo.