Repository navigation
fix(ios): match tab bar items to tabs by identity - #602
Merged
Merged
Conversation
When built with the iOS 27 SDK, UITabBar.items follows display order and a search role tab moves to the end, while UITabBarController.tabs keeps declaration order. Matching items to routes by position shifted titles, selected images and accessibility labels for every tab after the search tab. Fixes #596 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
thiagobrez
enabled auto-merge
October 21, 2026 12:43
thiagobrez
disabled auto-merge
October 21, 2026 12:58
3 tasks done
Merged
4 of 5 tasks
Draft
4 of 5 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
Bug fix. Fixes #596.
When an app is built with the iOS 27 SDK,
UITabBar.itemsfollows display order, so asearchrole tab moves to the end.UITabBarController.tabskeeps declaration order.configureTabBarItemImagesmatched items tofilteredItemsby position, so every tab after the search tab got the next route's title, selected icon and accessibility label. Presses still reached the right route, which made the tab labelled Library open Search.This matches each item to its tab by identity (
tabs[i].viewController?.tabBarItem === item) on iOS 18+, and falls back to the position otherwise. Builds with the iOS 26 SDK keep the old order, so they behave as before.#588 changes the same function, so whichever lands second needs a small rebase.
How to test?
Verified in a fresh React Native 0.88.0 app with agent-device, reading the tab labels and pressing every tab:
Not tested: physical devices, iPad sidebar, tvOS, visionOS, hidden tabs and the More tab.
Screenshots
Xcode 27.1, iOS 27.0, after pressing the last tab:
🤖 Generated with Claude Code