/duology-ship:duo-migratefrom duology-ship
Guides migrating an iOS app to iPhone Duo (Apple's foldable) step by step: updating from Xcode 26/27.0 to Xcode 27.1 with iOS 27.1 SDK, fixing launch crashes, layout issues, vertical bars, and preparing for April 2027 App Store rules.
Ships in duology-ship. 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.
Take an app that ships today and make it right on iPhone Duo, in an order where each step can be checked before the next: where the app stands, what stops it launching, the rebuild, the code Apple warns against, what the new SDK changes on its own, and the proof.
Load other skills for the detail of each fix: duo-start (it detects the SDK, the stack and the deployment target; run it first), duo-lint (finds the patterns), duo-layout (sizes, the fold), duo-navigation (vertical bars), duo-continuity (state through a fold), duo-scenes (windows, Split View), duo-testing and duo-pose-matrix (the proof).
Labels: measured means we ran it on the iPhone Duo simulator (iOS 27.1) on 23 October 2026; details in references/evidence.md. Unverified means we could not confirm it. Everything else comes from Apple's pages, linked inline.
The SDK an app is built with decides how it looks on iPhone Duo, before any code change (prepare page, Tech Talk 111461):
| Built with | Open (inner display) | Closed (outer display) |
|---|---|---|
| iOS 26 SDK or older (Xcode 26) | An iPhone-sized window in the middle, empty space around it | Content beside the status bar and camera |
| iOS 27 SDK (Xcode 27.0) | Fills most of the display, but keeps clear of the status bar on the right edge | Apple doesn't say |
| iOS 27.1 SDK (Xcode 27.1) | Edge to edge; toolbars and tab bars can turn vertical below the status bar | Edge to edge |
So the first visible win is the rebuild. The rebuild also changes layout with no code change (the vertical bars), which is why Apple asks you to check content against vertical bars before shipping a 27.1 build.
DEVELOPER_DIR=/Applications/Xcode-27.1.app/Contents/Developer, and never run sudo xcode-select.if #available(iOS 27.1, *). Raising the target is the user's call.UIRequiresFullScreen is not the fix by itself. The app resizes on iPhone Duo with or without it; the fix is a layout that resizes.Run duo-start's detection script (duo-start, references/detect.md). Write down five things before touching anything:
DTSDKName in the last build, then the default Xcode.IPHONEOS_DEPLOYMENT_TARGET).App, a UIKit app with a scene delegate, or a UIKit app with no scenes.UIRequiresFullScreen, in the Info.plist or as INFOPLIST_KEY_UIRequiresFullScreen.SUPPORTS_MACCATALYST), because some iOS 27.1 APIs need a compile-time guard there.Then tell the user which row of the table above their users see today.
From iOS 27, a UIKit app built with the latest SDK must adopt the scene life cycle, or it fails to launch (Transitioning to the UIKit scene-based life cycle). Two signs it hasn't: no UIApplicationSceneManifest with a configuration in the Info.plist, and no application(_:configurationForConnecting:options:) in the app delegate. Older systems already log a console message for such apps (from iOS 18.4, reworded in iOS 26). SwiftUI apps that use the App protocol already have scenes; skip to Step 3.
Measured: a UIKit app with no scene manifest and no configurationForConnecting, built with Xcode 27.1, stopped 3.8 s after launch on the iPhone Duo simulator: EXC_BREAKPOINT, raised inside UIKit's check for apps that have not adopted scenes. The same app with a scene delegate launched and kept running.
The move, in short (full code and the mapping of app-delegate callbacks in references/fixes.md):
UIApplicationSceneManifest) to the Info.plist, or let Xcode generate it (INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES).UISceneConfiguration from application(_:configurationForConnecting:options:).application(_:didFinishLaunchingWithOptions:) to scene(_:willConnectTo:options:), created with UIWindow(windowScene:). UIWindow(frame:) is deprecated since iOS 26.sceneDidBecomeActive(_:), sceneDidEnterBackground(_:) and the rest). Once the app has scenes, UIKit stops calling the app delegate's versions. For the state of the whole app, across scenes, observe UIApplication notifications such as willEnterForegroundNotification.Apple's App Resizability skill in Xcode 27.1 can do this conversion; duo-start (references/routing.md, "Apple's skills in Xcode 27.1") says how to run it next to Duology.
Build locally first, on the shared iPhone Duo simulator:
DEVELOPER_DIR=/Applications/Xcode-27.1.app/Contents/Developer \
xcodebuild -project MyApp.xcodeproj -scheme MyApp \
-destination "id=<UDID of the iPhone Duo simulator>" build
UIScreen.main and UIWindow(frame:) as deprecated only when the deployment target is iOS 26 or later. With an iOS 16 target, the same code built without a warning (measured). duo-lint finds them at any target (Step 4)..xcode-version, a workflow's DEVELOPER_DIR or xcode-version, fastlane). The path of Xcode 27.1 on a hosted runner depends on its image; read the runner's list of installed Xcodes rather than guessing. Xcode Cloud picks its Xcode in the workflow settings, not in the repo.Apple groups what to remove into a few patterns (prepare page). Two tools find them: Apple's App Resizability skill, which Apple says finds most issues but not all, and duo-lint, which flags them in seconds without the model reading the codebase:
| Apple's pattern | duo-lint | Where the fix lives |
|---|---|---|
| Sizing from the main screen | DUO001 | fixes.md, duo-layout |
| Layout from device orientation | DUO002, DUO003 | fixes.md |
| Idiom or size class as a device check | DUO004, DUO005 | fixes.md, duo-layout |
| Checks for known device sizes | DUO006, DUO007, DUO009 | fixes.md, duo-layout |
UIRequiresFullScreen | DUO008 | fixes.md |
| Full-bleed images and video cropped on wide windows | not linted: search for .scaleAspectFill and contentMode: .fill | fixes.md |
Run duo-lint from the app's folder (duo-lint) and keep its report as the list for Step 5.
Use the size of the view or window you are in, never the screen's, and read it again whenever it changes: a fold changes it while the app runs. The before-and-after code for each pattern, UIKit and SwiftUI, is in references/fixes.md.
These need no lint finding to break; check them on the rebuilt app:
duo-navigation).duo-continuity). Pushing a screen when the phone is closed and popping it during the unfold animation left stale insets in our recipes (measured there; duo-continuity, references/swiftui.md).duo-scenes).duo-lint reports 0 findings, or only findings silenced with a reason.duo-testing)./duo-poses, duo-pose-matrix), compared with the screenshots from Step 3.#available are safe on it, and the fallback serves older iPhones.Before: built with <SDK>, so on iPhone Duo people saw <row of the table>.
Launch: <scene life cycle adopted | already had scenes>.
Rebuild: Xcode 27.1 locally and in CI (<file changed>).
Fixed: <n> duo-lint findings (<rules>), <media fixes>. Silenced: <finding, reason> or none.
Checked: <build, tests, poses, Split View>. Not checked: <real device, …>.
Deployment target: <unchanged | changed, at the user's request>.
UIRequiresFullScreen and Catalyst are written down before any change.UIWindow(windowScene:); it launches on the iPhone Duo simulator.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
iphone-duo, ios-migration, foldable, xcode-upgrade, uikit-scenes
npx claudepluginhub kimeur/duology --plugin duology-ship6 skills in this plugin
/duo-app-storePrepares an app's App Store submission for iPhone Duo, Apple's foldable with a 1398 x 2034 outer display and a 2007 x 2853 inner display: App Store screenshots of both displays at the exact sizes App Store Connect lists, flattened without alpha, captured from the iPhone Duo simulator in each pose with a clean status bar; app previews (886 x 1920); uploading them in App Store Connect or with the App Store Connect API (screenshot display type APP_IPHONE_DUO, not in Apple's API reference yet); the 'optimized for iPhone Duo' product page badge; promotional text and the App Store Connect preview tool; App Review notes for the poses; the privacy manifest; and the April 2027 rules (Duo screenshots required, iOS 27 SDK or later, iOS 15 or later). Use when someone asks for Duo screenshots, store assets, a submission checklist or review notes for iPhone Duo./duo-lintThe fold linter for iPhone Duo, Apple's foldable with an outer display and an inner display. Run it to find code Apple says to remove before an app runs on the foldable; it reports each finding with the fix for its rule. Catches UIScreen.main and UIScreen.screens, UIDevice.current.orientation, statusBarOrientation, the deprecated interfaceOrientation properties and effectiveGeometry.interfaceOrientation, userInterfaceIdiom == .pad, horizontalSizeClass == .regular treated as iPad, hard-coded screen sizes (bounds.height == 844), GeometryReader sizes matched to devices, .frame(width: 390) and fixed width constraints, and UIRequiresFullScreen. Use it before a review or release, in CI (GitHub annotations), after editing SwiftUI or UIKit layout code, or when a screen breaks when the phone folds, unfolds or resizes. It reads code only; for a full iPhone Duo audit that also checks screenshots, use /duo-audit or the duo-design-review checklist./duo-performanceKeeps an iPhone Duo app smooth when the phone folds and unfolds. One fold changes the app's layout size in several steps (a full-width view went 382 → 466 → 951 → 867 pt on open), and every body that reads the size runs at each step; at 120 Hz a frame lasts 8.3 ms. Measures what each fold costs the main thread on the iPhone Duo simulator with duo-fold-cost (Instruments' Hangs and os_signpost instruments while duo-pose folds the phone, with a saved run to compare against), finds the cause, and fixes it: no sorting, formatting or decoding in body, the size read once as a small value, identity kept across poses, lazy rows, follow-up work after the fold settles. Splits hitch and hang time by pose from real users with iOS 27 MetricKit and StateReporting. Says what the simulator can't measure (frame rate, hitches, the SwiftUI instrument) and what to check on a device. Use when a Duo app freezes, stutters or drops frames on fold or unfold, before a release, or to keep a fold from getting slower./duo-pose-matrixScreenshots an iPhone Duo app in every pose (closed, open, book, tabletop) on the iPhone Duo simulator by pressing Device Hub's pose buttons through the macOS Accessibility API, then writes summary.md and summary.json to review with the duo-design-review checklist. Use when asked to check, test or screenshot an app in each pose, fold or hinge state, to capture outer and inner display frames for a design review or the App Store, to change the simulator's pose from the command line or a script (simctl and devicectl have no pose command), to run /duo-poses, or when a review is missing book or tabletop frames. Ships duo-pose (status, list, set) and duo-pose-matrix, with a manual fallback when the user has not given Accessibility permission, and checks that no UI tests share the simulator before it changes the pose./duo-testingWrites and runs tests for iPhone Duo apps, Apple's foldable with an outer display and an inner display, on the Mac and on the iPhone Duo simulator in Xcode 27.1. Use when adding logic tests (swiftc script, or Swift Testing with @Test and #expect), UI tests with XCTest and XCUIAutomation, launch arguments such as -uiTesting, -resetState and jump-to-screen switches with a TestSupport type, test markers with accessibilityIdentifier and accessibilityValue, when a tap or drag in a UI test doesn't reach a SwiftUI gesture (coordinate(withNormalizedOffset:), press(forDuration:thenDragTo:)), when XCUIDevice rotation or a fold can't be scripted, or when running xcodebuild test on the existing iPhone Duo simulator with -destination id=<UDID>, -parallel-testing-enabled NO, -only-testing, -resultBundlePath, -collect-test-diagnostics and xcresulttool.Other plugins' skills for the same job