Developer details SwiftUI fixes for a folding iPhone Duo's changing window size
A developer behind the PawLife pet health app found that a single SwiftUI codebase needed targeted changes to run on the folding iPhone Duo, which Xcode 27.2 simulators reported. Simulator measurements showed the app's window switching live between a narrow folded portrait layout and a wide open landscape layout, with an 84-point reserved column on the trailing edge. Widths cached at first layout, containerRelativeFrame behavior across the hinge, and safe-area handling under the camera all broke as a result. The developer resolved these by measuring width once at the root and passing it down through the environment, clamping layouts to that value, and pushing edge-to-edge screens clear of the occluded region. Idiom-based layout checks were replaced with width thresholds because the Duo reports as a phone yet is wider than some iPads in portrait.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in