FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(ios): TabView search tab placement on iOS 27 by NathanWalker · Pull Request #11509 · NativeScript/NativeScript · GitHub

Repository navigation

fix(ios): TabView search tab placement on iOS 27 - #11509

Merged
NathanWalker merged 1 commit into
mainfrom
fix/ios-27-search-tab
Oct 6, 2026
Merged

NathanWalker merged 1 commit into
mainfrom
fix/ios-27-search-tab

Conversation

NathanWalker commented Oct 6, 2026 •
edited
Loading

Copy link
Copy Markdown
Contributor

PR Checklist

What is the current behavior?

On iOS 27, a TabViewItem with role="search" renders as a regular inline tab instead of the separate, floating search button seen on iOS 26.

There are two causes:

  1. setViewControllers assigns tabs and then viewControllers. On iOS 26 the tab bar kept the UISearchTab rendering anyway. On iOS 27 the viewControllers assignment replaces the UITab configuration entirely (tabs reads back empty), so the UISearchTab is lost.
  2. iOS 27 moves the separated placement to UITabBarController.prominentTabIdentifier (UIKit's counterpart to SwiftUI's TabRole.prominent). Per the header, a search tab gets it by default only when automaticallyActivatesSearch is enabled.

What is the new behavior?

On iOS 27+:

  • The tab bar is configured through tabs alone, without the viewControllers reassignment.
  • prominentTabIdentifier is set to the role="search" tab, or to a tab with the new role="prominent" (which takes precedence).
  • In this mode UIKit reports selection only through tabBarController:shouldSelectTab: and didSelectTab:previousTab:, so the delegate implements both. They share the existing view-controller logic (two-navigation-bar handling, blocking re-selection of the current tab, selectedIndex sync). _onViewControllerShown and the More-navigation check resolve the index from tabs when viewControllers is nil.

On iOS 18–26 the code path is unchanged: the tab delegate methods return early whenever viewControllers is set. On those versions role="prominent" is a regular tab.

Verification

Run on simulators (toolbox + apps/automated):

iOS 18.5 iOS 26.5 iOS 27.0
role="search" inline (unchanged) separated (unchanged) separated (was inline)
role="prominent" – inline separated
tap selection → selectedIndex – ✅ ✅ (via didSelectTab)
TAB-VIEW / -NAVIGATION / -NEW / -ROOT e2e – 21/3/1/3 ✅ 21/3/1/3 ✅

New e2e tests in TAB-VIEW assert prominentTabIdentifier for the search role, for prominent-over-search precedence, and for no role (they skip below iOS 27). getNativeTabCount falls back to tabs when viewControllers is 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).

nx-cloud Bot commented Oct 6, 2026 •
edited
Loading

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix Eligible

An automatically generated fix could have helped fix failing tasks for this run, but Self-healing CI is disabled for this workspace. Visit workspace settings to enable it and get automatic fixes in future runs.

To disable these notifications, a workspace admin can disable them in workspace settings.


View your CI Pipeline Execution ↗ for commit 5b8829c

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

Base automatically changed from feat/types-ios-27 to main October 6, 2026 20:14
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 11d3f70 to 5b8829c Compare October 6, 2026 20:25

pkg-pr-new Bot commented Oct 6, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nativescript/core@11509
npm i https://pkg.pr.new/@nativescript/vite@11509
npm i https://pkg.pr.new/@nativescript/webpack@11509

commit: 5b8829c

NathanWalker merged commit 0955953 into main Oct 6, 2026
9 of 10 checks passed
NathanWalker deleted the fix/ios-27-search-tab branch October 6, 2026 23:20
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL