Adopt UISearchTab for role="search" on iOS 26+ to enable automatic search activation #4000
cookshelf-katie
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
On iOS 26,
<NativeTabs.Trigger role="search">(via expo-router) renders with the new search-tab visual treatment — separated pill, docked field — but does not auto-focus the search field or open the keyboard when the tab is tapped. Apple's own apps (App Store, Maps) do.This is not about displaying the search tab chrome; that already works. The missing behavior is automatic activation of the attached UISearchController when selecting the search tab, which appears to require UISearchTab rather than UITabBarItem(systemItem: .search).
The native iOS 26 API for this is
UISearchTab.automaticallyActivatesSearch. From the docs: "the search field activates automatically upon tab selection, provided the view controller's navigationItem has a non-nil searchController."Why we don't get it for free today
RCTConvert+RNSBottomTabs.mm:74maps'search'toRNSBottomTabsScreenSystemItemSearch, andRNSConversions-BottomTabs.mm:356converts that toUITabBarSystemItemSearch. iOS 26 dresses up the legacy system item with the new chrome automatically, which is why the visual is right. But the auto-activation behavior is gated on actually using the newUISearchTabclass, which we never instantiate.Repro
Set up a search tab per the expo-router native tabs docs with a
Stack.SearchBarinside, run on iOS 26, tap the search tab from another tab.Proposal
When
role="search"on iOS 26+, useUISearchTabwithautomaticallyActivatesSearch = trueinstead ofUITabBarItem(systemItem: .search). Optionally exposeautomaticallyActivatesSearchas a prop so consumers can opt out.Versions: react-native-screens ~4.23.0, react-native 0.83.6, expo ~55.0.9, iPhone 17 Pro on iOS 26.2.
Beta Was this translation helpful? Give feedback.
All reactions