Repository navigation
fix(iOS): screen not rendering after tab change on iOS 27 - #530
Merged
Merged
Conversation
3 tasks done
walking
approved these changes
Jun 10, 2026
Collaborator
Author
|
Released in |
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.
1 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
Fixes #529.
On iOS 27, Apple silently replaced the
tabBarController(_:shouldSelect:)delegate method totabBarController(_:shouldSelectTab:)onTabView, which broke Tab selection because it would never be broadcasted to JS, resulting in a white screen.