Skip to content

fix(ios): wrap the app in GestureHandlerRootView (swipeable list crashed) - #114

Merged
os-zhuang merged 1 commit into
mainfrom
fix/ios-gesture-handler-root
Jun 11, 2026
Merged

fix(ios): wrap the app in GestureHandlerRootView (swipeable list crashed)#114
os-zhuang merged 1 commit into
mainfrom
fix/ios-gesture-handler-root

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Found via iOS Simulator testing

Opening any record list on iOS threw a redbox:

PanGestureHandler must be used as a descendant of GestureHandlerRootView. Otherwise the gestures will not be recognized.

…from SwipeableRow (the list rows' swipe-to-edit/delete actions). react-native-gesture-handler requires a GestureHandlerRootView at the app root on iOS, and the root layout didn't have one. Never reproduced on web.

Fix

Wrap the whole tree in <GestureHandlerRootView style={{ flex: 1 }}> in app/_layout.tsx.

Verified on device

The All Tasks list now renders on the iPhone 17 simulator with no redbox — and that one screen confirms three fixes together:

1298 tests pass, lint clean.

🤖 Generated with Claude Code

…hed)

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
<GestureHandlerRootView style={{ flex: 1 }}>.

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) <noreply@anthropic.com>
@os-zhuang
os-zhuang merged commit 83c2d01 into main Jun 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant