Skip to content

fix(iOS): screen not rendering after tab change on iOS 27 - #530

Merged
thiagobrez merged 8 commits into
mainfrom
fix/ios27-tab-change
Jun 10, 2026
Merged

thiagobrez merged 8 commits into
mainfrom
fix/ios27-tab-change

Conversation

@thiagobrez

Copy link
Copy Markdown
Collaborator

PR Description

Fixes #529.

On iOS 27, Apple silently replaced the tabBarController(_:shouldSelect:) delegate method to tabBarController(_:shouldSelectTab:) on TabView, which broke Tab selection because it would never be broadcasted to JS, resulting in a white screen.

@thiagobrez thiagobrez mentioned this pull request Jun 9, 2026
3 tasks done
@thiagobrez
thiagobrez merged commit 6797d32 into main Jun 10, 2026
9 checks passed
@thiagobrez
thiagobrez deleted the fix/ios27-tab-change branch June 10, 2026 08:27
@thiagobrez

Copy link
Copy Markdown
Collaborator Author

Released in 1.3.0 🎉

DanielKuhn added a commit to codevise/react-native-bottom-tabs that referenced this pull request Jun 29, 2026
iOS 27 silently replaced the UITabBarControllerDelegate shouldSelect
callback with shouldSelectTab for SwiftUI's TabView, so tab presses no
longer reached JS and lazy tabs rendered a white screen on first open.

Add the shouldSelectTab delegate method (mapping the UITab back to its
index via tabBarController.tabs, matching filteredItems order) and
short-circuit shouldSelect on iOS 27+ to avoid double-firing onClick.
Pre-27 behavior is unchanged.

Port of callstack#530 (fixes callstack#529), adapted to
this index-based fork.
DanielKuhn added a commit to codevise/react-native-bottom-tabs that referenced this pull request Jul 1, 2026
Object identity alone ($0 === tab) returns nil if SwiftUI hands shouldSelectTab
a UITab that isn't identical to the tabs-array entry, which drops onClick and
(our bottom tabs are lazy) white-screens the target tab. Add an identifier
fallback to the lookup — a tab-to-tab comparison that needs no TabInfo.key match.
Mirrors the lookup hardening in callstack#530.
Addresses review on app MR !1900.
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.

Not works on iOS27 Developer Beta Version

2 participants