DEV Community

Cover image for iPhone Duo app checklist: fix bars, folds and scene crashes
ExtensionBooster
ExtensionBooster

Posted on Originally published at appranker.net

iPhone Duo app checklist: fix bars, folds and scene crashes

Originally published on AppRanker.

If your iPhone Duo app checklist is still empty, your app is already running on Apple's foldable anyway, most likely as a small iPhone-shaped island in the middle of a 7.6-inch screen. The fix is not one setting but a short chain of SDK, layout and toolbar changes. Below is that chain in the order you will hit it, with the code you need at each step.

Which SDK you build with decides how much screen you get

Apple's tech talk on preparing for iPhone Duo spells out three tiers. Your binary's SDK picks the row:

Built with Closed (5.4" outer) Open (7.6" inner)
iOS 26 SDK or older Uses the area left of the status bar and camera Centered, iPhone-sized, empty space around it
iOS 27 SDK (Xcode 27) Resizes like any iPhone app Extends left of the status bar, not edge to edge
iOS 27.1 SDK (Xcode 27.1) Full screen Edge to edge, with nav and toolbar buttons stacked vertically

Nothing crashes on old builds; they just look dated next to apps that did the work. Reaching the bottom row takes two rebuilds, and the first one has a trap.

Step 1: Survive the Xcode 27 rebuild

Since iOS 18.4, TN3187 has warned that the UIKit scene life cycle becomes mandatory once you build against the SDK after iOS 26. That SDK is iOS 27. Skip the migration and launch fails with:

Application failed to launch: UIScene life cycle is required for apps built with this SDK.
Enter fullscreen mode Exit fullscreen mode

You are affected if Info.plist lacks a UIApplicationSceneManifest with configurations, or your app delegate does not implement application(_:configurationForConnecting:options:). The minimal fix is a scene delegate that owns the window:

final class SceneDelegate: UIResponder, UIWindowSceneDelegate {
    var window: UIWindow?

    func scene(_ scene: UIScene,
               willConnectTo session: UISceneSession,
               options connectionOptions: UIScene.ConnectionOptions) {
        guard let windowScene = scene as? UIWindowScene else { return }
        let window = UIWindow(windowScene: windowScene)
        window.rootViewController = RootViewController()
        window.makeKeyAndVisible()
        self.window = window
    }
}
Enter fullscreen mode Exit fullscreen mode

Register it under UISceneConfigurations → UIWindowSceneSessionRoleApplication with UISceneDelegateClassName set to $(PRODUCT_MODULE_NAME).SceneDelegate. Keep app-wide setup (analytics, crash reporting) in the app delegate and move window and UI setup into the scene. SwiftUI apps built on the App protocol are already scene-based. On Expo, Flutter or React Native, check the framework's Xcode 27 release notes first, because the fix normally ships in its template.

Simulator missing? In Xcode 27.1, open Settings > Components and press Update on the iOS 27.1 runtime even if it shows as installed, then add the device via Device Hub with + > iPhone > iPhone Duo. Expect it to be slow on M1 machines.

Step 2: Base layout on size classes, not the device

The Duo is still the iPhone idiom, but it swings between compact width (outer display) and regular width and height (inner display). So userInterfaceIdiom and interface orientation are the wrong inputs. Read size classes instead:

// SwiftUI
@Environment(\.horizontalSizeClass) private var hSize

// UIKit
traitCollection.horizontalSizeClass
Enter fullscreen mode Exit fullscreen mode

Two more common bugs:

  • UIScreen.main is ambiguous with two displays and is headed for deprecation. Use traitCollection.displayScale, or window?.windowScene?.screen if you really need the screen.
  • Symmetric safe-area math breaks because vertical bars can sit on either side. Replace bounds.width - safeAreaInsets.left * 2 with bounds.inset(by: safeAreaInsets).width.

Portrait-only apps: the orientation lock applies on the outer display only. On the inner display the system scales your app instead, and Apple has said there is no supported way to force portrait there. UIRequiresFullScreen keeps you out of Split View but does not stop resizing.

Step 3: Let the system move your bars

On the Duo, navigation bars, toolbars and tab bars can sit vertically along the edge. You get this only from system containers: .toolbar inside NavigationStack/NavigationSplitView, or toolbar items on a view controller in a navigation controller. Hand-built UIToolbar or UITabBar views stay horizontal. One forum report traced stuck toolbar items to a Group wrapped around the NavigationStack.

Rules for items that survive the move:

  1. Give every item both an icon and a title; vertical bars show icons, and title-only or custom-view items are dropped.
  2. Pin Done with .topBarPinnedTrailing (SwiftUI) or pinnedTrailingGroup (UIKit).
  3. Set visibilityPriority so the right items fall into overflow first.
.toolbar {
    ToolbarItem(placement: .topBarPinnedTrailing) {
        Button("Done", systemImage: "checkmark") { save() }
    }
    ToolbarItem {
        Button("Share", systemImage: "square.and.arrow.up") { share() }
    }
    .visibilityPriority(.high)
}
Enter fullscreen mode Exit fullscreen mode

If a sheet looks wrong with a vertical bar, opt out per presentation with toolbarVerticalBehavior(.disabled) or preferredVerticalBarBehavior.

Step 4: Avoid the fold and the camera (iOS 27.1)

A half-open phone puts a fold through your view, and the inner front camera can cover content. iOS 27.1 models both as reserved regions. Wrap these APIs in if #available(iOS 27.1, *):

  • ArrangementView / UIArrangementViewController lay out a primary and secondary view and keep them off the fold.
  • reservedRegions(kind:options:) returns the frames to stay clear of.
  • onHingeChange / UIHingeInteraction report hinge state and angle; use them for effects, not layout.

Folding is a size and trait change, not a new scene, so lost state usually means view models are rebuilt on resize. Also test Split View with your app on both sides, and handle failure when requesting a new scene, since new windows open only on the inner display.

Key takeaways

  • Two rebuilds: Xcode 27 (scene life cycle required) and Xcode 27.1 (edge to edge plus fold APIs).
  • Lay out by size class and container, never by idiom, orientation or UIScreen.main.
  • Vertical bars need system containers and items with both icon and title.
  • App Store builds need a release or RC Xcode, and the Duo screenshot sizes are 1398 x 2034 (outer) and 2007 x 2853 (inner), plus landscape.

The original post also covers the submission timeline and a printable checklist in the full iPhone Duo app readiness guide. If you are planning a launch push around the update, AppRanker's paid app leaderboard is one place to put the release in front of iOS users.

What broke first when you opened your app on the iPhone Duo simulator: the scene crash, stuck toolbars, or the portrait lock?

Top comments (0)