iOS Dev News

iPhone Duo Developer Guide: Get Your App Ready with Xcode 27.1

RS
Raiyan Shahid Building ExamAI, FileForge, CodeCompiler & Party Rush under BrynFlow · Get in touch

In short: Apple's foldable iPhone Duo is on sale, and Xcode 27.1 is the toolchain for it. Rebuild with the iOS 27.1 SDK so your app goes edge to edge, stop sizing layouts from UIScreen.main or device orientation, then test every pose in the iPhone Duo simulator. This iPhone Duo developer guide covers what changes, the new APIs and how to test.

Searches for "Xcode 27.1" have spiked on Google Trends this week, and Google suggests "iphone duo developer guide", "iphone duo xcode 27.1", "iphone duo hinge api" and "iphone duo xcode simulator" as people type. That is no surprise: iPhone Duo went on sale in its first countries on October 23 according to Apple's newsroom, and Apple is now pushing developers to ship optimised builds. If you maintain an iOS app, or a Flutter or React Native app that runs on iOS, this iPhone Duo developer guide sums up what Apple has published so far, in plain language.

What iPhone Duo means for your iOS app

iPhone Duo has two screens. Closed, you use the outer display like a normal iPhone. Open, you get an inner display that Apple says is 50 percent larger than the iPhone 18 Pro Max, with the same aspect ratio as the outer one. Your app can move between the two at any time, so it must handle a window that changes size while it runs, much like an iPad app in a resizable window.

How your app looks depends on the SDK you build with. Apple's Prepare your app for iPhone Duo page lists three cases:

So the single most useful step is to build with Xcode 27.1. It ships Swift 6.4 and the iOS 27.1 SDK, and Apple's release notes say it requires a Mac running macOS Tahoe 26.6 or later.

The three steps Apple recommends

1. Run the app resizability skill

Xcode 27.1's coding assistant has an iPhone Duo skill. Apple suggests asking it to "get my app ready for iPhone Duo"; other coding agents can load it with xcrun agent skills export. Apple is clear that it finds most issues but not all, so treat it as a first pass and review every change.

2. Fix the layout patterns that break

Apple groups the problems into four patterns. Each one assumes the screen never changes:

A typical fix in SwiftUI looks like this:

// Before: assumes one fixed screen
let columns = UIScreen.main.bounds.width > 600 ? 3 : 2

// After: uses the space this view actually has
struct LessonGrid: View {
    @State private var width: CGFloat = 0

    var body: some View {
        let columns = width > 600 ? 3 : 2
        LazyVGrid(columns: Array(repeating: GridItem(.flexible()), count: columns)) {
            // ...cells
        }
        .onGeometryChange(for: CGFloat.self) { proxy in
            proxy.size.width
        } action: { newWidth in
            width = newWidth
        }
    }
}

For scale-dependent drawing, read @Environment(\.displayScale) in SwiftUI or traitCollection.displayScale in UIKit rather than the screen's scale.

3. Test resizing

Apple lists three ways to test: the resizable iOS simulator in Device Hub, iPhone Mirroring on macOS 27 (drag the window to extreme sizes), and the iPhone Duo simulator in Xcode 27.1, which Apple calls the best way to test the full native experience.

New iPhone Duo APIs in the iOS 27.1 SDK

Apple's summary of its iPhone Duo group lab names these APIs, available on iOS 27.1 and later. Each has a SwiftUI and a UIKit version:

These names come from Apple's lab summary rather than full reference pages, so check the exact signatures in Xcode's documentation before you write code against them, and gate them with if #available(iOS 27.1, *).

Behaviour worth knowing from Apple's Q&A

Testing in the iPhone Duo simulator: known limits

Device Hub in Xcode 27.1 lets you open, close, fold and rotate a simulated iPhone Duo. Apple's Xcode 27.1 release notes list a few known issues: the first simulator launch can take several minutes, StandBy is not available in the iPhone Duo runtime, and running or debugging most app extensions is not supported there yet. If the simulator does not appear at all, the iOS 27.1 runtime is probably missing; our Xcode simulator not showing fix guide walks through installing it.

Apple's engineers also recommend checking reachability and tap targets on real hardware, because the simulator cannot show how the device feels in your hand.

Flutter and React Native apps

Cross-platform apps run inside a normal iOS window, so the same rule applies: lay out from the size you are given, not from the device. In Flutter that means LayoutBuilder and MediaQuery.sizeOf(context); in React Native, useWindowDimensions(). Watch your framework's release notes for builds made with the iOS 27.1 SDK, because the SDK version decides how your app is displayed. Our Flutter vs React Native in 2026 comparison covers how each framework handles native platform changes.

Getting the "Made for iPhone Duo" badge

Apple says you can submit optimised apps now. Upload iPhone Duo screenshots in App Store Connect to get the iPhone Duo badge on your product page, and use the featuring nomination form to tell Apple your app supports all device poses. Apple has not announced a deadline that requires iPhone Duo support.

Frequently asked questions

Which Xcode do I need to build apps for iPhone Duo?

Xcode 27.1. It includes Swift 6.4, the iOS 27.1 SDK and the iPhone Duo simulator, and Apple says it needs a Mac running macOS Tahoe 26.6 or later.

What happens to my app on iPhone Duo if I do not update it?

Apple says apps built with the iOS 26 SDK or earlier still run but do not adapt: on the open inner display the app appears in the centre with empty space around it. Apps built with the iOS 27 SDK resize, and apps built with the iOS 27.1 SDK go edge to edge with vertical toolbars and tab bars.

Is there a hinge API for iPhone Duo?

Yes. Apple's iPhone Duo group lab summary names onHingeChange for SwiftUI and UIHingeInteraction for UIKit, available on iOS 27.1 and later. There is no single posture value; Apple suggests combining hinge state, hinge angle, orientation and size class.

How do I test my app on iPhone Duo without the device?

Use the iPhone Duo simulator in Xcode 27.1. Device Hub lets you open, close, fold and rotate the simulated phone. Apple's release notes warn that the first launch can take several minutes and that StandBy and most app extensions are unavailable in that simulator runtime.

Does closing iPhone Duo restart my app?

No. Apple's engineers said in the group lab that opening and closing is a size class and trait change, not a scene disconnect, and the process stays alive. Use stateRestorationActivity(for:) for state that must survive a real scene disconnect.

Sources

Last checked November 25, 2026. API names come from Apple's published guidance and lab summary; confirm exact signatures in the iOS 27.1 SDK documentation.

Where to go next

Build adaptive iOS apps

The free iOS with Swift track covers SwiftUI layout, navigation and data, with hands-on projects.

Start the iOS Track