iPhone Duo layout issue without SceneDelegate, using UIScreen.main.bounds (Xcode26 iOS26 SDK

Background We are currently building our app with Xcode 26 and the iOS 26 SDK. We want to verify the runtime behavior on iPhone Duo. We have three questions:

  1. We haven't adopted SceneDelegate lifecycle management yet. We create the window using init(frame:), with the frame value taken from UIScreen.main.bounds. Will this implementation cause any issues on iPhone Duo?

  2. For all non-Auto Layout layouts, we fetch view width by reading UIScreen.main.bounds. Do we need to rewrite all these code points? Will this lead to layout exceptions when the device switches between folded and unfolded states?

  3. We observed the system handles fold/unfold compatibility, but black bars appear in both states. Can our app keep consistent view dimensions in both modes? Will viewWillTransitionToSize:withTransitionCoordinator: fire to trigger re-layout when switching between folded and unfolded states?

Answered by Frameworks Engineer in 905682022

You cannot build an app that takes advantage of the features of iPhone Duo while building with Xcode 26 and the Xcode 26 SDK. As such your first step should be to update your application to adopt Scene Lifecycle.

Additionally you will need to stop relying upon UIScreen.main for layout decisions. All manual layout should be done inside an override of UIView.layoutSubviews() or UIViewController.viewWill/didLayoutSubviews() and made with respect to the view's bounds.

You will get the opportunity to re-layout during fold & unfold. For manually laid out views the best place to do this work is during a layoutSubviews method as mentioned above. Using Auto Layout or the new layout containers introduced for iPhone Duo can make this much easier.

Fundamentally, our recommendations are to follow best practices as outlined in WWDC26 and earlier presentations. The videos released earlier this month along side the iPhone Duo announcement can also help you greatly in adapting your application.

Good luck with your app!

You cannot build an app that takes advantage of the features of iPhone Duo while building with Xcode 26 and the Xcode 26 SDK. As such your first step should be to update your application to adopt Scene Lifecycle.

Additionally you will need to stop relying upon UIScreen.main for layout decisions. All manual layout should be done inside an override of UIView.layoutSubviews() or UIViewController.viewWill/didLayoutSubviews() and made with respect to the view's bounds.

You will get the opportunity to re-layout during fold & unfold. For manually laid out views the best place to do this work is during a layoutSubviews method as mentioned above. Using Auto Layout or the new layout containers introduced for iPhone Duo can make this much easier.

Fundamentally, our recommendations are to follow best practices as outlined in WWDC26 and earlier presentations. The videos released earlier this month along side the iPhone Duo announcement can also help you greatly in adapting your application.

Good luck with your app!

Thank you very much for your detailed response and valuable recommendations.

At this stage, our application is still built using Xcode 26 and the iOS 26 SDK. Our primary priority right now is to validate runtime behavior for our existing binary running on iPhone Duo. We fully understand that full‑featured support for iPhone Duo requires Xcode 27 plus Scene lifecycle adoption, and we plan to implement those adaptations incrementally in future releases.

What we want to clarify specifically: aside from the expected black bars introduced by system compatibility mode, do our existing patterns raise functional bugs or layout risks on iPhone Duo when built with Xcode 26? The legacy patterns we are concerned about are:

  1. Window creation via init(frame:), where frame is derived from UIScreen.main.bounds, without adopting SceneDelegate lifecycle.
  2. Manual non‑AutoLayout layouts that read UIScreen.main.bounds directly to obtain view width.
  3. Whether viewWillTransitionToSize:withTransitionCoordinator: will still fire on fold/unfold state changes under this Xcode‑26‑built compatibility mode.

We would like to distinguish which of these usages must be fixed even for our Xcode‑26‑built release, versus which ones are safely handled by system compatibility and can remain unchanged for the time being. We are trying to decide whether urgent compatibility patches are required for our current Xcode 26 build.

Thank you again for your support.

iPhone Duo layout issue without SceneDelegate, using UIScreen.main.bounds (Xcode26 iOS26 SDK
 
 
Q