BS
BleepingSwift
Published on
8 min read
Beginner

> How to Get Your App Ready for iPhone Duo

Share:

iPhone Duo arrives October 23, running iOS 27.1, and it's the first iPhone where your app can change displays while someone is using it. Close the device and your app is on a small outer display. Open it and the same scene jumps to a much larger inner display. Fold it partway and the inner display gets a crease down the middle that your content shouldn't sit on.

The good news is that most of the work is the same work Apple has been nudging everyone toward for years. If your app already behaves on iPad, in Split View, or when someone resizes it through iPhone Mirroring on a Mac, you're most of the way there. This post is the checklist I'd work through, in order, with links to deeper posts on each of the new APIs.

What's Different About the Hardware

iPhone Duo has two displays. The outer one is compact and a bit wider and shorter than other iPhones, and it's what people use when the device is closed. The inner one is large and folds along a center hinge, which lets people hold it partly folded like a book, set it down on a surface, or stand it on its edge. Apple calls these positions poses, and your app needs to look right in all of them.

Two things change inside your UI as a result. First, on the outer display (and on the inner display in landscape), the system moves the status bar, navigation bar, toolbar, and tab bar to the side of the screen to save vertical space. Second, parts of the screen are now reserved by hardware. The outer front camera always covers a corner of the outer display, the inner front camera only appears when it's active, and when the device is partially open, the fold turns into a strip down the middle that content should stay out of.

Apple's Preparing your app for iPhone Duo article and the Designing for iPhone Duo page in the HIG are both worth reading end to end before you start changing code.

Rebuild With the Latest SDK First

The first step costs nothing. Apps built with Xcode 26 or earlier don't extend under the status bar and camera on iPhone Duo, so they end up with a smaller canvas than everything else on the device. Apple's guidance is to build with the latest version of Xcode to get the whole screen.

For the Duo-specific APIs and the simulator, you need Xcode 27.1 beta, which Apple released on September 18. It ships the iOS 27.1 SDK and an iPhone Duo simulator runtime, and it runs alongside Xcode 27 and the 27.2 beta if you keep several installed. If you're not sure which one to build with, I wrote up the differences in Xcode 27.1 beta or Xcode 27.2 beta.

Once it's installed, run your app on the iPhone Duo simulator and use Device Hub to walk through the poses: closed, fully open, partially folded, and rotated in each. Xcode Previews gained a Display group in the canvas overrides picker, so you can also preview a view on the device's other display without launching anything. The release notes list a few rough edges in the Duo simulator for now. The first launch can take several minutes, StandBy isn't available, and most app extensions can't be run or debugged in it yet.

While you're in the simulator, it's worth grabbing App Store screenshots of both displays. App Store Connect already lists the sizes: 1398 by 2034 pixels (or 2034 by 1398 in landscape) for the outer display, and 2007 by 2853 pixels (or 2853 by 2007) for the inner display. Apple says uploads for the device will open later this year, so there's no rush, but the simulator is the easiest place to capture them.

Size Classes, Not Device Checks

The HIG's advice is refreshingly simple. Design a compact width layout for the outer display and a regular width layout for the inner display, and every pose falls out of those two layouts.

What breaks on Duo is code that asks what kind of device it's on, or which way it's rotated, and picks a layout from that. userInterfaceIdiom can't tell you how much room you have, and interface orientation tells you nothing about the fold. Apple's Duo guidance calls out both as things not to base layout on. Read the size class instead:

Swift
struct AlbumLibraryView: View {
    @Environment(\.horizontalSizeClass) private var horizontalSizeClass

    var body: some View {
        AlbumGrid(columnCount: horizontalSizeClass == .regular ? 4 : 2)
    }
}

I picked an even column count on purpose. The HIG recommends it for grids so that content splits cleanly on either side of the fold.

In UIKit, read the trait inside a method that supports automatic trait tracking, such as updateProperties(), and UIKit will call it again whenever the size class changes:

Swift
final class NowPlayingViewController: UIViewController {
    private let stackView = UIStackView()

    override func updateProperties() {
        super.updateProperties()
        let isRegular = traitCollection.horizontalSizeClass == .regular
        stackView.axis = isRegular ? .horizontal : .vertical
    }
}

The same logic applies to sizes. Size views relative to their container or your scene, not to the screen. On Duo, your app moves between two displays as the device opens and closes, so anything that caches the main screen's size can go stale, which is why lingering UIScreen.main calls are worth hunting down now. I covered the replacements in Replacing UIScreen.main Before iPhone Duo.

Expect Lopsided Safe Areas

When the system moves bars to the side, it adds a leading or trailing safe area inset for the vertical bar. That means your left and right insets are no longer mirror images of each other, and any layout that assumed symmetric horizontal padding will look off-center.

The fix is to lean on the safe area rather than hard-coded padding. Keep foreground content inside the safe area so it never slides under the side bar, and let backgrounds and hero images extend past it so the screen still feels full:

Swift
struct TrailDetailView: View {
    var body: some View {
        ZStack {
            Image("trailhead")
                .resizable()
                .scaledToFill()
                .ignoresSafeArea()

            TrailSummaryCard()
                .padding()
        }
    }
}

For hero images, Apple suggests backgroundExtensionEffect(), which fills the space under the vertical bar with mirrored, blurred copies of the image instead of a hard edge. The safe area post covers the basics if you want a refresher.

Let System Containers Do the Heavy Lifting

A lot of Duo support comes free when you use standard containers. A NavigationSplitView collapses to a single column on the outer display and expands on the inner display, and when the device folds it adjusts column widths so each pane stays readable. Alerts, context menus, and sheets move themselves away from the fold. Toolbars and tab bars move to the side automatically, but only if they come from a navigation container. Custom bars built from UIToolbar or a hand-rolled HStack of buttons stay put.

It's also worth testing Split View multitasking on the inner display. When two apps share it, each one gets its controls along its outer edge, so your app might have a vertical bar on the leading side in one configuration and the trailing side in another.

Where the New APIs Come In

Once the basics are solid, the iOS 27.1 SDK adds a handful of APIs for the cases where the system can't guess what you want. Each one has its own post:

  • Vertical toolbars: control which items appear on the side bar, what overflows first, and when to opt out.
  • ArrangementView: a container for a primary and secondary view that splits or overlaps them around the fold.
  • ReservedRegion: query the fold and camera areas when you position custom content yourself.
  • Hinge angle: read the fold angle for interactive effects, not for layout.
  • Camera direction: work out which camera faces the person as your app moves between displays.
  • Camera capture accessory: show content on the outer display while someone records with the inner one.

Sample Project

Want to see this code in action? Check out the complete sample project on GitHub:

View on GitHub

The repository includes a working Xcode project with all the examples from this article, plus unit tests you can run to verify the behavior.

Wrapping Up

If I had to boil it down, I'd rebuild with the latest Xcode, run through every pose in the Xcode 27.1 simulator, and replace any layout logic that depends on device type, orientation, or screen size with size classes and container geometry. That alone covers most apps. The new APIs are there for custom layouts, custom bars, and camera apps, and you'll know fairly quickly from the simulator whether you need them.

subscribe.sh

// Stay Updated

Get notified when I publish new tutorials on Swift, SwiftUI, and iOS development. No spam, unsubscribe anytime.

>

By subscribing, you agree to our Privacy Policy.