/iphone-duo-skills:iphone-duo-adaptivity-auditfrom iphone-duo-skills
Audits iOS apps for legacy screen, orientation, idiom, and lifecycle code that breaks on iPhone Duo's inner display and iOS 27 resizable environments. Covers SwiftUI and UIKit, ships a read-only scanner.
Ships in iphone-duo-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The foundation for everything else: an app that decides layout from the screen, the orientation or the idiom is wrong on iPhone Duo before any foldable-specific work begins.
mainScreen deprecated). (111461 3:57; 278 2:51)
Concretely: the iPhone Duo simulator's own profile names the outer display as
main-screen-*, so an app that asks for the main screen gets the smaller of the
two whichever display it is actually on. (references/device-geometry.md, measured)windowScene(_:didUpdateEffectiveGeometry:)
is guaranteed when the scene moves to the other display (Forums 848021), but
layout-time adaptation is the better route, and folding alone does not call it
(Booted, scripts/probes/forum_probe.swift in the repository).Info.plist key brings back the
boxed presentation once the app links the iOS 27 SDK (Forums 847856;
references/api-availability.md › What each linked SDK gets).UIRequiresFullScreen no longer opts an app out of resizing from iOS 27: it gives
discrete resizing, and iPhone Duo still resizes the app when it opens or closes and
scales it on the inner display, including in Split View — meant for games.
Remove the key only after the layouts adapt: removal makes the scene resize
continuously at once.
Add UIRequiresFullScreenIgnoredStartingWithVersion only after that too:
a value of 27 or earlier also makes the scene resize continuously on iOS 27.
(278 5:46; 111461 4:37; TN3192)UILaunchScreen, UILaunchScreens, UILaunchStoryboardName or
UILaunchStoryboards in the Info.plist, or App Store Connect rejects it with
ITMS-90870.
An empty UILaunchScreen dictionary or
INFOPLIST_KEY_UILaunchScreen_Generation = YES is enough. (TN3208; TN3192)references/device-geometry.md). Adaptive apps make no assumptions about device
capabilities (111461 2:34): copy, symbols and onboarding that name Face ID are
wrong on it.python3 scripts/duo_scan.py <root> --format markdown
python3 scripts/duo_scan.py <root> --format json # for exact IDs
Rules owned here: DUO001 main screen, DUO002 screen bounds, DUO003 idiom,
DUO004 orientation, DUO005 app lifecycle, DUO009 global window state,
DUO012 scene delegate without manifest, DUO013 Face ID copy, DUO020
UIRequiresFullScreen, DUO022 no launch screen.
Member chains split across lines (connectedScenes … .first) are joined before
matching; other multi-line expressions, macros and generated code are not seen, so
follow up with targeted searches when the inventory suggests more.scale, pixel alignment, image sizes) → replace with trait..pad gate means "iPad" or "a big screen".
A feature hidden on iPhone for lack of room stays hidden on the inner display,
because iPhone Duo is .phone there too: that gate is a layout decision.
Check the hardware too: iPhone Duo supports Apple Pencil (USB-C) without hover
(references/device-geometry.md), so a hover preview stays off.faceid symbols, onboarding) →
derive from LAContext.biometryType. DUO013 reports medium where nothing in
the file ever asked, and low next to an existing biometryType read — confirm
those strings sit in the .faceID branch and mark them kept.--output-dir the command writes into the current directory:
out="$(mktemp -d)" && xcrun agent skills export --output-dir "$out" >/dev/null 2>&1; ls "$out"
If it yields uikit-app-modernization (Xcode 27.0) or App Resizability (27.1), use it for bulk
UIKit rewrites: it applies deprecate-and-forward patterns, preserves guards and
control flow, and tracks file coverage. Review its diff against the approved items.
SwiftUI code and anything it leaves as a TODO come back here.
Installed as an agent skill, it also triggers on "get my app ready for iPhone Duo"
and applies every task it has; scope it to the approved items first.references/recommendation-format.md; wait for
approval; apply; build; re-scan.Full before/after code for SwiftUI and UIKit: references/legacy-api-remediation.md.
| Legacy | UIKit replacement | SwiftUI replacement |
|---|---|---|
UIScreen.main.scale | traitCollection.displayScale (auto-tracked in layoutSubviews, draw(_:), updateProperties; else registerForTraitChanges) | @Environment(\.displayScale) |
UIScreen.main (the screen) | view.window?.windowScene?.screen; pass a UIScreen parameter where no view is at hand | Rarely needed — ask what the screen is for |
UIScreen.main.bounds for available space | view.bounds in viewDidLayoutSubviews; scene level: windowScene.effectiveGeometry + windowScene(_:didUpdateEffectiveGeometry:) | GeometryReader, onGeometryChange(for:of:action:), containerRelativeFrame |
userInterfaceIdiom == .pad for layout | traitCollection.horizontalSizeClass / container size | @Environment(\.horizontalSizeClass) |
interfaceOrientation, UIDevice.current.orientation for layout | Size classes or bounds.width > bounds.height | Size classes or geometry aspect |
Scene interfaceOrientation (deprecated in 27 SDK) where orientation is truly needed | windowScene.effectiveGeometry.interfaceOrientation | same, from the view's window scene |
| Orientation to align sensor data | motionManager.deviceMotionBody = view, locationManager.headingBody = view | same, on a hosting view |
UIApplication.shared.keyWindow / windows / connectedScenes.first | view.window, view.window?.windowScene | the view's own context; openWindow/dismissWindow environment actions |
| App lifecycle only | UIApplicationSceneManifest + UIWindowSceneDelegate; move window setup to scene(_:willConnectTo:options:) | @main struct …: App is already scene-based |
"Face ID" in copy, faceid symbols | A switch context.biometryType (.faceID, .touchID, default) after canEvaluatePolicy, feeding titles and UIImage(systemName:) | The same switch in a small model feeding Label / Button(_:systemImage:) |
scene.interfaceOrientation → effectiveGeometry.interfaceOrientation).
Restructuring it — new representables, observers, different data flow — is a separate
proposal for the developer to approve, because the documentation exists precisely so
that nobody "improves" it unasked.xcrun --sdk iphonesimulator swiftc -typecheck on the edited files at the deployment
target, and re-run duo_scan.py. Report what was and was not verified.init or static storage; closing or
opening iPhone Duo moves the scene to another display. Recompute on trait or
geometry change.scene-lifecycle-task.md reference when available, or Apple's
Transitioning to the UIKit scene-based life cycle (Forums 848011).stateRestorationActivity(for:)) is for a real scene disconnection,
not for a fold (Forums 847644).traitCollectionDidChange(_:) is deprecated since iOS 17. It still behaves the
same on iPhone Duo (Forums 848021), so move off it as code is touched rather than as
a blocker: registerForTraitChanges(_:handler:) or automatic trait tracking
(278 2:51). The scan inventory counts it.UIRequiresFullScreen alone in games that need discrete resizing.
For other apps, recommend adapting first and removing the key after that.
Never add UIRequiresFullScreenIgnoredStartingWithVersion as a first step..strings and .xcstrings for "Face ID" and build those
sentences from the biometry name instead. Keep NSFaceIDUsageDescription: Face ID
devices still need it.evals/evals.json (opens in a new tab)evals/files/FloatingDock/AGENTS.md (opens in a new tab)evals/files/FloatingDock/Sources/DockBleedModifier.swift (opens in a new tab)evals/files/FloatingDock/Sources/GalleryGrid.swift (opens in a new tab)evals/files/Ledger/Ledger/LedgerViewController.swift (opens in a new tab)evals/files/Ledger/Ledger/SceneDelegate.swift (opens in a new tab)evals/files/Onboard/Onboard/WelcomeCard.swift (opens in a new tab)evals/files/Puzzler/Puzzler/GameView.swift (opens in a new tab)evals/files/Puzzler/Puzzler/Info.plist (opens in a new tab)evals/files/Puzzler/Puzzler/Puzzler.xcconfig (opens in a new tab)evals/files/Puzzler/Puzzler/PuzzlerApp.swift (opens in a new tab)evals/files/VaultLock/Info.plist (opens in a new tab)evals/files/VaultLock/Sources/UnlockScreen.swift (opens in a new tab)evals/files/VaultLock/Sources/VaultLockApp.swift (opens in a new tab)evals/trigger-evals.json (opens in a new tab)references/api-availability.md (opens in a new tab)references/device-geometry.md (opens in a new tab)references/legacy-api-remediation.md (opens in a new tab)references/recommendation-format.md (opens in a new tab)references/sources.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
5 skills in this plugin
/iphone-duo-barsPrepare navigation bars, toolbars and tab bars for iPhone Duo's vertical bars, where controls move to the side of the outer display and of the inner display in landscape. Use when a developer asks about vertical bars, bar item ordering, back, custom back or close button placement, pinned trailing or prominent actions, toolbar items without titles, axisBehavior, symbol-only items and badges, custom views in toolbars, toolbarVerticalEdge or verticalBarEdge, overflow menus and ToolbarOverflowMenu, visibilityPriority, toolbar or tab bar compression, custom UIToolbar or UINavigationBar instances, hand-built tab bars or bars that must stay custom, sheet toolbars and presentationPlacement, backgrounds under the bar with backgroundExtensionEffect, or opting out with toolbarVerticalBehavior. Covers SwiftUI and UIKit, based on Apple's "Raise the bar with iPhone Duo", "Preparing your app for iPhone Duo" and Apple engineers' forum answers./iphone-duo-displaysUse iPhone Duo's hinge, two displays, two front cameras and multiple windows in SwiftUI and UIKit apps. Use when a developer asks about the hinge angle or fold state, onHingeChange or UIHingeInteraction, interactions driven by folding, Split View multitasking or the stacked video layout on iPhone Duo, multiple scenes or windows on iPhone, requestSceneSessionActivation errors on the outer display, UIWindowSceneActivationAction, scene accessories, sceneAccessory, CameraCaptureAccessory, a teleprompter or subject preview on the outer display, the virtual front camera, AVCaptureDeviceDirectionCoordinator and cameras that change direction when the device opens or closes, preview mirroring, or a widget so the app appears in StandBy on the outer display. Based on Apple's "Leverage multiple displays and scenes" and "Build a great camera experience for iPhone Duo". Not for column widths, safe areas or content around the fold (layout) or toolbar items (bars)./iphone-duo-layoutUse when an app's layout or geometry breaks or wastes space on iPhone Duo's foldable inner display: layouts that should become multi-column in regular × regular size classes, NavigationSplitView or TabView sidebars, a phone-width column stuck in the middle, asymmetric safe-area insets, content under the side bar or the keyboard in Split View, content, floating controls, sheets, collection-view sections or WKWebView pages crossed by the hinge in book or tabletop pose, the FaceTime camera covering UI, or video letterboxing on the wide inner screen. Also use it for the iOS 27.1 layout APIs: reservedRegions (division, occlusion, right-to-left mirroring), ReservedRegion / UIView.ReservedRegion, ArrangementView / UIArrangementViewController split or overlay with their ratio, edge and axis modifiers, and corner-aware margins. Not for toolbar items or overflow menus, removing idiom or orientation checks, hinge-angle interactions, or generic SwiftUI and Auto Layout bugs unrelated to the foldable./iphone-duo-readinessEnd-to-end readiness workflow for iPhone Duo, Apple's foldable iPhone with an outer display and a regular-by-regular inner display. Use when a developer wants to prepare, audit, plan or test a SwiftUI or UIKit iOS app for iPhone Duo, the iOS 27 / 27.1 SDK resizable-app changes, foldable poses and the hinge, vertical bars, Device Hub pose simulation, Apple's "Prepare your app for iPhone Duo" guidance, or what an iPhone Duo submission owes App Store Connect (screenshots for both displays, the April 2027 deadlines). Runs a read-only scan and SDK check first, produces a tiered plan with session citations, changes code only after itemized approval by delegating to the iphone-duo specialist skills, and verifies against a pose matrix.npx claudepluginhub alexey1312/iphone-duo-agent-skill --plugin iphone-duo-skills