If you build for the web — or embed web content inside a native app via WKWebView — supporting iPhone Duo mostly comes down to standard responsive design best practices.
Don’t try to detect iPhone Duo
Apple’s engineers are explicit: there is no reliable way to fingerprint iPhone Duo from the web, and you shouldn’t try. User-Agent sniffing won’t distinguish it from other iPhones. Instead, your page sees a viewport whose dimensions can change at any time as the user opens, closes, or splits the screen — and your layout should respond just like it does when a desktop browser window resizes:1
- Use fluid CSS layouts paired with media queries or container queries based on available width rather than device model names.
- Re-measure on
resizeevents or, better yet, attach aResizeObserverto layout-critical elements. - When using
viewport-fit=cover, pad interactive elements withenv(safe-area-inset-*)and apply each side’s inset independently, since safe areas on iPhone Duo are frequently asymmetric. - Don’t assume
orientation: portraitmeans a narrow mobile column — the unfolded inner display is nearly square.
Foldable web APIs are still experimental
Two W3C specifications target foldable displays:
- Viewport Segments API: exposes the geometry of each sub-region when a viewport is divided by a fold, via CSS environment variables like
env(viewport-segment-width 0 0)and media features likehorizontal-viewport-segments.2 - Device Posture API: reports whether the device is
continuous(flat) orfolded, via thedevice-postureCSS media feature andnavigator.devicePosturein JavaScript.3
/* Matches only when the viewport is split side by side across a fold */
@media (horizontal-viewport-segments: 2) {
.reader {
display: grid;
grid-template-columns: env(viewport-segment-width 0 0) 1fr;
column-gap: calc(env(viewport-segment-left 1 0) - env(viewport-segment-right 0 0));
}
}
In iOS 27.1, Safari ships both specifications behind opt-in experimental feature flags (Settings > Apps > Safari > Advanced > Feature Flags).45 Regular users won’t have those flags enabled, and they cannot be turned on inside WKWebView.1 Treat them strictly as progressive enhancements: build your layout so it works cleanly as a single continuous viewport first, then layer segment queries on top.
Native apps hosting WKWebView
A WKWebView automatically inherits the bounds and safe-area insets of its native container. When hosted inside a standard navigation stack or split view, it resizes and updates its safe areas automatically as the device folds and unfolds. Because the W3C foldable APIs aren’t active in WKWebView, use native reserved regions if you need to position native toolbars or overlays around the web view without crossing the crease.