-
What's the best practices to adopt iPhone Duo for a production UIKit app? What few things we need to consider during the development?
-
"As long as we use auto layout, it should be fine" is this correct term for iPhone Duo? Meaning, as long as our app use proper auto layout, our app should be able to support iPhone Duo properly.
Best Practice to adopt iPhone Duo
I have the same question。if I can just auto layout UI?
Auto Layout is a good baseline, but there are a few Duo-specific things to check too. Avoid fixed widths and layout assumptions tied to one screen size, and make sure your content respects both safe areas and the reserved regions around the hinge and cameras. UIKit’s standard containers, such as UISplitViewController and UITabBarController, adapt to the different poses. For custom layouts, UIView can report division and occlusion regions so you can position content around them.
I’d test the app on both the outer and inner displays, in portrait and landscape, and with the device opened and closed. Apple’s iPhone Duo design guidance and UIKit reserved region API are good places to start.
Auto Layout is a good baseline, but a few UIKit things commonly break on Duo even in Auto Layout apps.
First, reading the size once at launch (UIScreen.main.bounds, a cached width) goes stale when the window resizes. Apple lists "Reading size once at launch" as an anti-pattern: https://developer.apple.com/iphone-duo/prepare/
Second, branching on userInterfaceIdiom. Apple says the idiom stays .phone, so use size classes (outer display compact width, inner display regular width): https://developer.apple.com/design/human-interface-guidelines/designing-for-iphone-duo
Third, the fold and cameras are reserved regions. UIView.reservedRegions(kind:options:) returns them, and UIKit tracks the regions you read in updateConstraints(): https://developer.apple.com/documentation/uikit/uiview/reservedregions(kind:options:)
Fourth, the SDK you build with changes what the app gets (iOS 26 SDK: centered, iOS 27 SDK: fills the screen but avoids the status bar, iOS 27.1 SDK: edge to edge), so rebuild with Xcode 27.1 and test in Device Hub.
I put a free, MIT-licensed checklist and a static scanner that flags these patterns in a Swift project together here, with every claim linked to an Apple page or labelled third-party: https://github.com/ilan-uzan/duo-ready (I'm the author.)