Letterboxing stands out more in games and video apps than almost anywhere else: a full-screen game shrunk into a narrow iPhone window in the middle of a 7.6-inch canvas. Apple’s guidance for game developers boils down to four principles.3
Stay playable across every pose
Your game should run smoothly whether iPhone Duo is closed, unfolded flat, or partially folded — and transitions can happen mid-level without relaunching your process. When the player opens or closes the phone, your scene simply receives a new size. Link against the iOS 27.1 SDK, size your Metal or engine render target from the view or window bounds (see Size from the window, not the screen), and resize dynamically without resetting gameplay state.3
Note that UIRequiresFullScreen does not prevent your window from resizing when the user folds or unfolds the device. The plist key is deprecated, and Apple recommends removing it.1
Expand the viewport instead of adding black bars
Rather than letterboxing or pillarboxing a fixed aspect ratio, expand your camera frustum to show more of the game world and reflow HUD elements to the corners of the active canvas. Where a fixed aspect ratio is unavoidable (such as pre-rendered cutscenes or fixed-board puzzles), fill the surrounding space with background artwork rather than plain black bars.1
Anchor virtual joysticks and touch buttons using safeAreaInsets and reserved regions, keep interactive controls off the hinge crease, and treat left and right insets independently since iPhone Duo’s safe areas are often asymmetric. In Table pose, place touch controls on the flat bottom half of the display where the device rests steadily on the table.
Whether you use a custom Metal renderer, Unity, or Unreal, drive viewport updates from your engine’s surface-resize callbacks rather than caching startup screen dimensions.1
Treat the hinge as an optional analog input
onHingeChange (SwiftUI) and UIHingeInteraction (UIKit) report a continuous hinge angle, which can serve as an expressive analog input for gameplay or visual effects — Apple’s sample app uses it as a whammy bar to bend guitar pitch. Because update rate and precision are managed by system power policy, treat the angle as a throttled, approximate signal, and always provide a fallback on non-foldable devices where hinge is nil.1
Read motion data relative to the active display
Because motion sensors sit in a fixed half of the chassis, folding the phone changes their orientation relative to the display the player is looking at. To get Core Motion attitude data aligned with the screen hosting your view, conform your view to CMBodyIdentifiable and assign it to CMMotionManager.deviceMotionBody:
motionManager.deviceMotionBody = gameView // conforms to CMBodyIdentifiable
motionManager.startDeviceMotionUpdates(using: .xArbitraryZVertical, to: .main) { motion, _ in
let attitude = motion?.attitude // corrected for the display hosting gameView
}
Screen-relative motion correction applies while your app is running full screen on that display; in Split View, Core Motion falls back to the device’s default reference frame. The same API also keeps bubble levels, star-gazing apps, and 3D compasses accurate across folds.2
Video playback
AVKit scales video viewports automatically, and playback continues uninterrupted across fold transitions. Picture in Picture works just like on other iPhones and moves to the outer display automatically when the phone closes.2 See Split View, multiple windows and keeping state for details.