iphone-duo-adaptive-la…
Build layouts that adapt to the iPhone Duo fold using reserved regions, division and occlusion regions, displacement patterns,…
Audit and port an iOS app to iPhone Duo, Apple's first foldable iPhone. Use when asked to support, adapt, prepare, test, or review an app for iPhone Duo, foldable iPhone, the inner/outer display, device poses, or the fold. Entry point that routes to the layout, bars,
Claude Code
$ npx -y skills add mirzaaghazadeh/iphone-duo-skills --skill iphone-duo-readiness --agent claude-code
Codex
$ npx skills add mirzaaghazadeh/iphone-duo-skills --skill iphone-duo-readiness -a codex -y
Cursor
$ npx skills add mirzaaghazadeh/iphone-duo-skills --skill iphone-duo-readiness -a cursor -y
Gemini CLI
$ npx skills add mirzaaghazadeh/iphone-duo-skills --skill iphone-duo-readiness -a gemini-cli -y
GitHub Copilot
$ npx skills add mirzaaghazadeh/iphone-duo-skills --skill iphone-duo-readiness -a github-copilot -y
OpenCode
$ npx skills add mirzaaghazadeh/iphone-duo-skills --skill iphone-duo-readiness -a opencode -y
Windsurf
$ npx skills add mirzaaghazadeh/iphone-duo-skills --skill iphone-duo-readiness -a windsurf -y
name: iphone-duo-readiness description: Audit and port an iOS app to iPhone Duo, Apple's first foldable iPhone. Use when asked to support, adapt, prepare, test, or review an app for iPhone Duo, foldable iPhone, the inner/outer display, device poses, or the fold. Entry point that routes to the layout, bars, hinge/scenes, camera, and design skills.
iPhone Duo is Apple's first foldable iPhone: a 5.4-inch outer display and a 7.6-inch inner display sharing one aspect ratio, joined by a hinge the user can leave at any angle. An existing iPhone app runs on it unchanged — but it will look like an app that has not been thought about.
This skill is the entry point. Work the checklist, then hand off to the specialist skill for whatever the app actually does.
**iPhone Duo is not a new idiom. It is a wider continuum of sizes.**
Every mistake in this port comes from an app asserting something fixed: this idiom, this orientation, this screen, this width, this symmetric inset. Every fix is the same shape — replace the assertion with a question about the space actually available right now.
If you find yourself writing a branch that means "if iPhone Duo", stop. Write a branch on size class or available space instead, and it will be right on iPad, in Split View, under iPhone mirroring, and on whatever ships next.
Find out what the app is building against, because the SDK is the gate:
| Built against | Behavior on iPhone Duo | |---|---| | iOS 26 SDK or earlier | Runs, but doesn't adapt. Open, the app sits **centered with empty space around it**. Closed, content shows to the left of the status bar and camera. | | iOS 27 SDK | Resizes to fill most of the inner display, but still avoids the status bar on the right edge. | | **iOS 27.1 SDK or later** | Extends to the full display, with toolbars and tab bars vertical below the status bar. Unlocks the reserved-region and arrangement APIs. |
Check the deployment target and the SDK in the project, then say plainly which tier the app is in. Getting to the 27.1 tier is the single highest-leverage change; almost everything else in this skill assumes it.
One caution before you ship at the 27.1 tier: that's the point where the bars go vertical, so confirm the content adapts to that before releasing. Jumping tiers without checking is how an app ends up with controls overlapping its own layout.
Xcode ships an **App Resizability** skill (renamed from the app modernization skill; it now covers SwiftUI and iPhone Duo). In Xcode, ask the coding assistant to *get my app ready for iPhone Duo* and it scans for the patterns in Step 2, explaining each and proposing a fix.
Not using Xcode's assistant? Export the skill and use it in another agent:
xcrun agent skills export
It catches most issues but not all, so still work Step 2 by hand afterwards.
Three tools, in increasing fidelity:
that break under arbitrary sizes.
directions. Good for catching cached-size bugs.
real thing. Drive open, close, rotate and fold, and try Split View by dragging the app to one side with the home indicator.
Bugs here are visual and pose-dependent. You will not find them by reading code.
Grep the codebase for these. Each one is a real defect on this device:
**Orientation branches.** Grep for `UIDevice.current.orientation`, `statusBarOrientation`, and `interfaceOrientation` — including `windowScene.effectiveGeometry.interfaceOrientation`. The inner display *does not honor supported interface orientations*, and orientation no longer tells you what shape your app is. To learn whether you're wider than tall, compare width and height of the space you actually have: `view.bounds` in a view controller, `superview.bounds` in a view, or the `GeometryReader` size in SwiftUI.
**`UIScreen.main`.** Ambiguous on a two-display device and slated for deprecation. Each use has a specific replacement:
| Instead of | Use | |---|---| | `UIScreen.main.bounds` | `view.bounds` / `window.bounds`; `GeometryReader` or `onGeometryChange` in SwiftUI | | `UIScreen.main.scale` | `traitCollection.displayScale`, or `@Environment(\.displayScale)` | | `UIWindow(frame: UIScreen.main.bounds)` | `UIWindow(windowScene:)` | | A stored `UIScreen` | `view.window?.windowScene?.screen`, read on demand |
**Size read once, then cached.** This one hides well. Reading size at launch — or in `viewIsAppearing` — isn't enough, because a fold resizes your app *mid-session*. Do size-dependent layout in `layoutSubviews` / `viewDidLayoutSubviews`, and use `viewWillTransition(to:with:)` for work that must run on the change itself.
**"Regular width means iPad."** The trap most likely to produce a visibly wrong screen. Plenty of apps show an iPad-only layout when `horizontalSizeClass == .regular`, and assume iPhone is always compact. The inner display is regular width, so that iPad layout now runs on a phone. Check both directions: branches that fire on regular, and branches that assume compact. Related: delete any comparison against a specific device size, like `bounds.height == 844` or a table of known iPhone dimensions — none of them match this device.
**Full-bleed media.** Hero images and video set to `.scaleAspectFill` or `.aspectRatio(contentMode: .fill)` crop more aggressively on a wider display and can lose the subject entirely. Choose fill versus fit from the current size class or aspect ratio, or set a focal point.
**Symmetric inset math.** This is the subtle one. On iPhone Duo the safe area and layout margins are routinely asymmetric — vertical controls sit on on
Image © Apple Inc., from the iPhone Duo developer page, used for identification. Not affiliated with or endorsed by Apple. Agent skills for building iOS apps on iPhone Duo — Apple's first foldable iPhone, announced September 9, 2026.
Build layouts that adapt to the iPhone Duo fold using reserved regions, division and occlusion regions, displacement patterns,…
Build camera capture for iPhone Duo's two front cameras — the virtual front camera, the inner under-display and outer ultra-wide…
Adapt a Capacitor or Ionic app to iPhone Duo, Apple's first foldable iPhone — why the standard Device Posture and Viewport…
Review or design an iOS interface for iPhone Duo's poses — closed, open, book-folded, tabletop and tent — covering side-mounted…
Design and build two-pane experiences for iPhone Duo — the real pixel and point dimensions of each display and each half, the…
Adapt a Flutter app to iPhone Duo, Apple's first foldable iPhone — what MediaQuery gives you today, why displayFeatures does not…
Decompile Android APK, XAPK, JAR, and AAR files using jadx or Fernflower/Vineflower. Reverse engineer Android apps, extract HTTP…