Repository navigation
fix(ios): TabView search tab placement on iOS 27 - #11509
Merged
Merged
Conversation
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx test apps-automated -c=android |
❌ Failed | 3m 21s | View ↗ |
nx run-many --target=test --configuration=ci --... |
✅ Succeeded | <1s | View ↗ |
💡 Dealing with memory or CPU issues? See memory and CPU details with the resource usage add-on ↗.
☁️ Nx Cloud last updated this comment at 2026-10-06 20:32:15 UTC
On iOS 27, assigning viewControllers after tabs replaces the UITab configuration, so the UISearchTab was rendered as a regular inline tab. iOS 27 also only separates a search tab by default when automaticallyActivatesSearch is enabled. On iOS 27+ the tab bar is now configured through tabs alone, the search tab is marked via prominentTabIdentifier, and selection is synced through the UITab delegate callbacks. Adds role="prominent" (SwiftUI's TabRole.prominent) for any tab. iOS 18-26 behavior is unchanged.
NathanWalker
force-pushed
the
fix/ios-27-search-tab
branch
from
October 6, 2026 20:25
11d3f70 to
5b8829c
Compare
commit: |
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 Checklist
What is the current behavior?
On iOS 27, a
TabViewItemwithrole="search"renders as a regular inline tab instead of the separate, floating search button seen on iOS 26.There are two causes:
setViewControllersassignstabsand thenviewControllers. On iOS 26 the tab bar kept theUISearchTabrendering anyway. On iOS 27 theviewControllersassignment replaces the UITab configuration entirely (tabsreads back empty), so theUISearchTabis lost.UITabBarController.prominentTabIdentifier(UIKit's counterpart to SwiftUI'sTabRole.prominent). Per the header, a search tab gets it by default only whenautomaticallyActivatesSearchis enabled.What is the new behavior?
On iOS 27+:
tabsalone, without theviewControllersreassignment.prominentTabIdentifieris set to therole="search"tab, or to a tab with the newrole="prominent"(which takes precedence).tabBarController:shouldSelectTab:anddidSelectTab:previousTab:, so the delegate implements both. They share the existing view-controller logic (two-navigation-bar handling, blocking re-selection of the current tab,selectedIndexsync)._onViewControllerShownand the More-navigation check resolve the index fromtabswhenviewControllersis nil.On iOS 18–26 the code path is unchanged: the tab delegate methods return early whenever
viewControllersis set. On those versionsrole="prominent"is a regular tab.Verification
Run on simulators (toolbox +
apps/automated):role="search"role="prominent"selectedIndexdidSelectTab)TAB-VIEW/-NAVIGATION/-NEW/-ROOTe2eNew e2e tests in
TAB-VIEWassertprominentTabIdentifierfor the search role, for prominent-over-search precedence, and for no role (they skip below iOS 27).getNativeTabCountfalls back totabswhenviewControllersis nil. Core unit tests: 524 passed. Also type-checked against the published@nativescript/types-ios@9.1.3/@nativescript/types@9.1.3(identical to the merged #11508 typings).