From 12a7146b30d942075510ead18d3543c3891920e6 Mon Sep 17 00:00:00 2001 From: os-zhuang Date: Thu, 11 Jun 2026 12:37:29 +0500 Subject: [PATCH] fix(ios): wrap the app in GestureHandlerRootView (swipeable list crashed) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Opening any record list on iOS threw a redbox: "PanGestureHandler must be used as a descendant of GestureHandlerRootView" (from SwipeableRow's swipe actions). react-native-gesture-handler requires a GestureHandlerRootView at the app root on iOS, which the root layout was missing. Wrap the whole tree in . Found via iPhone 17 simulator testing (the list never crashed on web). Verified on device: the All Tasks list now renders — coloured status badges and the localized record count included — with no redbox. 1298 tests pass, lint clean. Co-Authored-By: Claude Opus 4.8 (1M context) --- app/_layout.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/_layout.tsx b/app/_layout.tsx index 9124dbc..97aa5d3 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -5,6 +5,7 @@ import { useCallback, useEffect, useMemo } from "react"; import { Stack, useRouter, useSegments } from "expo-router"; import { StatusBar } from "expo-status-bar"; import * as Linking from "expo-linking"; +import { GestureHandlerRootView } from "react-native-gesture-handler"; import { SafeAreaProvider } from "react-native-safe-area-context"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { ObjectStackProvider } from "@objectstack/client-react"; @@ -103,8 +104,9 @@ export default function RootLayout() { }, []); return ( - - + + + @@ -134,6 +136,7 @@ export default function RootLayout() { - + + ); }