iphone-duo-adaptive-la…
Build layouts that adapt to the iPhone Duo fold using reserved regions, division and occlusion regions, displacement patterns,…
Use the iPhone Duo hinge angle for interactions and effects, support Split View multitasking and multiple app scenes, and pair UI across both displays with scene accessories including CameraCaptureAccessory (SwiftUI) and UISceneAccessory.cameraCapture (UIKit). Use when building
Claude Code
$ npx -y skills add mirzaaghazadeh/iphone-duo-skills --skill iphone-duo-hinge-and-scenes --agent claude-code
Codex
$ npx skills add mirzaaghazadeh/iphone-duo-skills --skill iphone-duo-hinge-and-scenes -a codex -y
Cursor
$ npx skills add mirzaaghazadeh/iphone-duo-skills --skill iphone-duo-hinge-and-scenes -a cursor -y
Gemini CLI
$ npx skills add mirzaaghazadeh/iphone-duo-skills --skill iphone-duo-hinge-and-scenes -a gemini-cli -y
GitHub Copilot
$ npx skills add mirzaaghazadeh/iphone-duo-skills --skill iphone-duo-hinge-and-scenes -a github-copilot -y
OpenCode
$ npx skills add mirzaaghazadeh/iphone-duo-skills --skill iphone-duo-hinge-and-scenes -a opencode -y
Windsurf
$ npx skills add mirzaaghazadeh/iphone-duo-skills --skill iphone-duo-hinge-and-scenes -a windsurf -y
name: iphone-duo-hinge-and-scenes description: Use the iPhone Duo hinge angle for interactions and effects, support Split View multitasking and multiple app scenes, and pair UI across both displays with scene accessories including CameraCaptureAccessory (SwiftUI) and UISceneAccessory.cameraCapture (UIKit). Use when building fold-driven effects, multi-window support, or dual-display experiences.
Three capabilities that are unique to iPhone Duo, in rising order of ambition: reacting to the hinge, participating in Split View, and putting your own UI on both displays at once.
The system itself responds to the hinge — the wallpaper reacts to the angle with a zoom effect as the device opens. Apps can read the same signal.
Use the `onHingeChange` modifier in SwiftUI, or `UIHingeInteraction` in UIKit. Both give you:
`onHingeChange` hands your closure the previous and current hinge context. `UIHingeInteraction` hands its handler the interaction and an `Update` instead, and also fires when the view moves between hierarchies.
Watch the types — they differ between frameworks:
UIKit's `UIHinge.Status` is an enum with a fourth case, **`.unknown`**.
don't recompute it from thresholds. Update rate and precision are system policy — don't assume a frequency.
Full signatures, a reusable normaliser, and effect patterns are in `../iphone-duo-dual-pane-patterns/SKILL.md`.
Two things to check before using the value:
1. **Is there a hinge at all?** A `nil` hinge means the app is running on a device without one. Same binary, most devices. 2. **Is the device in a state you care about?** Usually you only want updates while partially open — and you need an `else` branch that resets whatever the angle was driving, so the effect doesn't stick at a stale value once the user opens the device flat.
Then map the angle to your parameter and update state.
**Interactions and effects.** The angle is a live, continuous input stream — it behaves like a sensor, and it suits things that respond continuously. Driving a pitch bend from the fold angle, the way a whammy bar works, is the right shape of idea.
**Not layout.** Do not lay out views from the hinge angle. Layout has proper tools that are declarative, testable and correct on devices with no hinge: arrangements and reserved regions, in `../iphone-duo-adaptive-layout/SKILL.md`. Reaching for the angle here produces layout that thrashes during the fold and breaks everywhere else.
**Every app participates.** Two apps sit side by side, created with the familiar home gesture — drag an app to one side and drop it. There's a second layout too, stacking video and apps together when Picture-in-Picture is pinned. Your app handles both identically.
If the app already supports resizing on iPad or under iPhone mirroring, it is most of the way there. The system gives you size classes and scene geometry to make layout decisions from; the general guidance in `../iphone-duo-readiness/SKILL.md` applies unchanged.
The detail worth testing: in Split View, vertically laid out bar content can appear on **either** side of your app, depending on which half you occupy. Drag the app to both sides in Device Hub and check that asymmetric safe area handling holds up.
iPhone Duo is the first iPhone to support **multiple simultaneous instances of an app's UI**. If the app already supports this on iPad, it works here too.
One behavior is genuinely new, though:
**New windows cannot be created on the outer display.** That is reserved for the inner display, and the availability changes as the user opens and closes the device. This dynamic availability doesn't exist on iPad.
Consequences:
on iPad can now fail.
windows aren't available — so users never tap an affordance that can't work.
Scene accessories pair additional content with your app's main UI on another display. They aren't Duo-specific — the same mechanism backs using an iPhone as a controller for a game on an external display — but iPhone Duo gives every user two displays to work with.
The system controls availability dynamically. Accessories are enabled by default and can be toggled at any time, so **observe availability rather than assuming it**: use the `onAvailabilityChange(perform:)` modifier in SwiftUI, or read `isAvailable` on the `UISceneAccessoryRegistration` in UIKit — it's observable in `updateProperties()` and `layoutSubviews()`. Reflect the current state in your UI (disabling a toggle button when the accessory can't be shown, for instance).
For camera apps, a camera capture accessory puts UI on the **outer** display — which faces the same way as the camera — while the capture interface stays on the **inner** one. The person in front of the lens gets something to look at: a script to read, a countdown before recording starts, how much of them the camera sees, or something to entertain a child.
The system decides when and where to present it. Your app passes no display, capture session or camera; the system finds the active capture session itself. Presentation needs the app **full screen on the inner display**, **in the foreground**, with an **active capture session**. Treat the content as an enhancement: the capture interface must work when nothing appears, and keep every essential control there. The outer display accepts touch, which suits
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…