# fix\(mobile\): Screens 5.0.0-t3.36 stops an iPhone Duo unfold crash · PR \#23151 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/23151)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

State: merged

Source repository: pingdotgg/t3code

Source branch: duo/screens-t3.35

Target branch: duo/bottom-line

Head commit: c3dafcf5e44aeed80a764720b7ab077530613c9b

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/23151)

[Commits](https://git.cafe/pingdotgg/t3code/pull/23151/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/23151/diffs?format=markdown)

## Description

---

Unfolding the iPhone Duo right after opening and closing sheets could abort debug builds. A screen re-parented by the split transition detached its touch handler a second time, and `RCTSurfaceTouchHandler` asserts on that (`RCTTouchHandler attached to another view`). Screens 5.0.0-t3.35 attaches and detaches the handler only when that changes something, for legacy screens and for split inspector columns.

The release also takes three upstream fixes:
- the side-rail tab bar appears when the Duo cold-launches unfolded ([software-mansion/react-native-screens#4990](https://github.com/software-mansion/react-native-screens/pull/4990))
- a recycled stack inside a newly presented sheet keeps its safe area ([#4997](https://github.com/software-mansion/react-native-screens/pull/4997))
- updating header subviews no longer crashes on a mutated collection ([#4851](https://github.com/software-mansion/react-native-screens/pull/4851))

The layer vendors **5.0.0-t3.36**, which is t3.35 plus one fix: the search field observer hook from #23146 now stores NSNotificationCenter's original implementation before installing itself. A registration on another thread in between used to call through a null pointer.

Sources: [t3-v5.0.0-t3.35](https://github.com/pingdotgg/react-native-screens/tree/t3-v5.0.0-t3.35) and [t3-v5.0.0-t3.36](https://github.com/pingdotgg/react-native-screens/tree/t3-v5.0.0-t3.36), in [pingdotgg/react-native-screens#3](https://github.com/pingdotgg/react-native-screens/pull/3). The tarball's `t3-fork.json` names that commit, and every tracked file in the tarball matches it.

## Verification

Fold, open and close the Git overview and Thread settings sheets, then unfold, on the Duo simulator:

| Screens | Runs | Aborts | Source |
|---|---|---|---|
| t3.31 (#22979, #22980 heads) | 4 | 2 | the motion evidence recordings for those PRs |
| t3.34 (the layer below this one) | 7 | 1 | 3 sheet-flow runs (1 abort), 4 crash-probe runs (none) |
| **t3.35** | **8** | **0** | sheet-flow runs |

The abort is intermittent, so the counts support the fix rather than prove it. The fix is the guard on the asserted condition itself. Touches inside the sheets still worked in every t3.35 run. The abort before the fix:

![Before: the app aborts as the unfold starts](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/f5b18439ba0d019a/finding-unfold-after-folded-sheets-crash-ee9cd8c1b4a-fe16f614bef.mp4)

`RCTAssert` is compiled out of release builds, so this was likely debug-only, but that is not verified. Upstream [#4990](https://github.com/software-mansion/react-native-screens/pull/4990)'s bug did not reproduce in this app, which already showed the tab bar on unfolded cold launches.

Implemented with Claude Opus 5.5 in Claude Code, running in T3 Code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

