
iphone-duo-hinge-and-scenes
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. Use when building fold-driven effects, multi-window support, or dual-display experiences.
- Installs
- 598
- Last 24h
- +25
- Trending rank
- #4856
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/mirzaaghazadeh/iphone-duo-skills --skill iphone-duo-hinge-and-scenes- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads iphone-duo-hinge-and-scenes automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Hinge, multitasking and scenes
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 hinge
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:
- a coarse status — closed, partially open, fully open
- a continuous angle, updated live
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:
- SwiftUI's angle is an
Angle; UIKit's is aCGFloatin radians. - SwiftUI's
DeviceHinge.Statusis a struct (aswitchneedsdefault); UIKit'sUIHinge.Statusis an enum with a fourth case,.unknown. - The system decides the status from the angle and device orientation, so 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:
- Is there a hinge at all? A
nilhinge means the app is running on a device without one. Same binary, most devices. - Is the device in a state you care about? Usually you only want updates
while partially open — and you need an
elsebranch 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.
What the hinge is for
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.
Split View multitasking
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.
Multiple scenes
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:
- Handle errors when requesting new scenes. A request that always succeeded on iPad can now fail.
- Prefer
UIWindowSceneActivation, which automatically hides itself when new windows aren't available — so users never tap an affordance that can't work.
Scene accessories
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 observation tracking, or the onAvailabilityChange modifier, and
reflect the current state in your UI (disabling a toggle button when the
accessory can't be shown, for instance).
CameraCaptureAccessory
For camera apps, CameraCaptureAccessory puts UI on the outer display while
the app's main UI stays on the inner one. The person being photographed can
see something while you shoot — showing a child something entertaining, or
running a teleprompter for a subject on camera.
Two conditions gate availability: the app must be full screen on the inner display, and it must have an active camera session.
Register the accessory on the same view as your camera UI. Scoping it that
way means the accessory appears and disappears with the camera view itself,
without any extra lifecycle code. In SwiftUI that's the sceneAccessory modifier
applied to the camera view.
Adding a toolbar control to toggle the accessory is a natural pairing — drive it
from your model, and use onAvailabilityChange to disable the control when the
accessory isn't available, such as when the device is closed.
Camera specifics — which physical camera is streaming, and which way it is
actually facing once two displays are involved — are in
../iphone-duo-camera/SKILL.md. That question gets genuinely subtle, and the
direction coordinator exists to answer it.
Checklist
- Support resizing first. Split View correctness follows from it.
- Test the app on both sides of a Split View, in every pose.
- If the app supports multiple windows, handle scene-request failure and adopt
UIWindowSceneActivation. - Consider whether a hinge-driven effect genuinely improves the app — then guard
for
nilhinge and reset state when the device leaves the range you care about. - For camera apps, evaluate whether a
CameraCaptureAccessoryon the outer display would help the person in front of the lens.
FAQ
What does the iphone-duo-hinge-and-scenes skill do?
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. Use when building fold-driven effects, multi-window support, or dual-display experiences.
How do I install iphone-duo-hinge-and-scenes?
Run npx skills add https://github.com/mirzaaghazadeh/iphone-duo-skills --skill iphone-duo-hinge-and-scenes in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/iphone-duo-hinge-and-scenes/ (personal) or .claude/skills/iphone-duo-hinge-and-scenes/ (project).
Which AI agents can use iphone-duo-hinge-and-scenes?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is iphone-duo-hinge-and-scenes safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains iphone-duo-hinge-and-scenes?
It is published by mirzaaghazadeh in mirzaaghazadeh/iphone-duo-skills. It has 598 recorded installs.
More from mirzaaghazadeh/iphone-duo-skills
iphone-duo-readiness
mirzaaghazadeh/iphone-duo-skills
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-adaptive-layout
mirzaaghazadeh/iphone-duo-skills
Build layouts that adapt to the iPhone Duo fold using reserved regions, division and occlusion regions, displacement patterns, and the split and overlay ArrangementView containers. Use when content or controls land in the fold, when building a split-like or overlay layout, or when custom manually-positioned UI must avoid the hinge or the under-display camera.
iphone-duo-design-review
mirzaaghazadeh/iphone-duo-skills
Review or design an iOS interface for iPhone Duo's poses — closed, open, book-folded, tabletop and tent — covering side-mounted controls, asymmetric layouts, fold avoidance, sheets, and how to use the inner display well. Use for design critique, mockup review, or deciding what a screen should look like on a foldable iPhone rather than how to code it.
iphone-duo-vertical-bars
mirzaaghazadeh/iphone-duo-skills
Adapt toolbars, navigation bars and tab bars for the vertical axis on iPhone Duo — item ordering, symbol vs text representations, axis behavior, overflow menus, visibility priority, and when to opt out. Use when toolbar items look wrong, overflow too early, or need to move to the side on the outer display.
iphone-duo-camera
mirzaaghazadeh/iphone-duo-skills
Build camera capture for iPhone Duo's two front cameras — the virtual front camera, the inner under-display and outer ultra-wide devices, AVCaptureDeviceDirectionCoordinator, preview mirroring and video gravity, and dual-display capture. Use when an app captures photo or video and must handle the device opening, closing or flipping.
iphone-duo-react-native
mirzaaghazadeh/iphone-duo-skills
Open the skill to read its SKILL.md instructions.
Popular mobile skills
design-mobile-apps
designed-by-ai/skills
Design mobile app screens with Sleek, edit Sleek projects, and implement their designs in React Native or HTML.
ios-design
uizze.sh
Design and review iOS UI/UX for iPhone apps in SwiftUI, UIKit, or React Native. Use for mobile app design, screen redesigns, navigation flows, typography, forms, keyboard and safe-area layout, and accessibility checks. Apply Apple Human Interface Guidelines and consult real product references through the optional Uizze connection.
vercel-react-native-skills
vercel-labs/agent-skills
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
animate-expo
emilkowalski/skills
Build animations in React Native and Expo, making the decisions in the order that determines whether they feel right — should it animate, which thread it runs on, which properties, spring or timing, how the gesture hands off, how it degrades. Writes the implementation with Reanimated, Gesture Handler, Expo Router and expo-haptics. Use when animating anything in an Expo app, adding gestures, sheets, screen transitions, press feedback or haptics, or fixing motion that stutters on device. For web animation use animate.
xcode-project-setup
firebase/agent-skills
Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).
firebase-remote-config-basics
firebase/agent-skills
Manages Firebase Remote Config templates, feature flags, loading strategies, and SDKs (Android, iOS). Use when downloading/deploying remoteconfig JSON templates, managing version history/feature flags, setting in-app defaults, fetchAndActivate(), real-time listeners, or SDK setup. Don't use for Firebase Hosting, Auth, Firestore, Data Connect, Crashlytics, or App Hosting.