Skip to content
FoldReadyGet an audit

iPhone Duo support for React Native and Flutter apps

Updated · 7 min read · Markdown version

React Native and Flutter apps run on iPhone Duo, but they must read window size reactively (useWindowDimensions in React Native, MediaQuery or LayoutBuilder in Flutter) instead of caching it at startup, handle asymmetric safe areas, and use native code for the iOS 27.1 ReservedRegion API until framework support lands.

Cross-platform teams are the least prepared for iPhone Duo. Their layout code often reads the window size once at launch, and their foldable experience, if any, comes from Android where the fold is exposed through different APIs. This guide covers what actually changes and what still needs native Swift.

What is the same as native?

React Native

import { Dimensions, useWindowDimensions } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";

// Wrong: read once at module load, never updates on fold or multitasking.
const { width: staleWidth } = Dimensions.get("window");

// Right: re-renders when the window changes.

function Library() {
  const { width } = useWindowDimensions();
  const insets = useSafeAreaInsets(); // per-edge, asymmetric on the inner display
  const regularWidth = width >= 600;   // conventional compact/regular cut in points; confirm in the Device Hub simulator
  return regularWidth ? <TwoColumn insets={insets} /> : <Stack insets={insets} />;
}

Flutter

// Reacts to window changes, including fold, unfold and multitasking.
Widget build(BuildContext context) {
  final size = MediaQuery.sizeOf(context);
  final padding = MediaQuery.paddingOf(context); // asymmetric on the inner display
  final regularWidth = size.width >= 600; // conventional cut in logical pixels; confirm in the simulator
  return regularWidth
      ? TwoColumnLayout(padding: padding)
      : StackedLayout(padding: padding);
}

// Prefer LayoutBuilder for widgets that only need their own constraints.
LayoutBuilder(builder: (context, constraints) =>
  constraints.maxWidth >= 600 ? const WideList() : const NarrowList());

Where native code is still required

NeedReact NativeFlutter
Rebuild with iOS 27.1 SDKXcode project settingXcode project setting
Window size updatesuseWindowDimensionsMediaQuery, LayoutBuilder
Asymmetric safe areasreact-native-safe-area-contextMediaQuery.paddingOf, SafeArea
Fold and camera reserved regionsNative module until a package existsPlatform channel until displayFeatures covers iOS
Half-fold detectionNative modulePlatform channel
Concentric corner shapesNative views onlyNative views only

Questions

Does React Native support iPhone Duo?
Yes. Apps run and resize. The work is in your layout code: window dimensions must be read reactively and safe areas applied per edge. Fold-specific APIs need a small native module for now.
Does Flutter support iPhone Duo?
Yes. MediaQuery and LayoutBuilder respond to window changes. Fold regions need a platform channel to the iOS 27.1 ReservedRegion API until Flutter exposes them on iOS.

Sources

More iPhone Duo guides