Repository navigation
Conversation
|
Warning JavaScript API change detected This PR commits an update to
This change was flagged as: |
huntie
marked this pull request as ready for review
October 20, 2026 17:07
This branch has not been deployed
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.
Summary
On iPhone Duo, iOS places the status bar in a vertical bar beside the content instead of along the top. This adds
StatusBar.getVerticalBarEdgeIOS()and auseVerticalBarEdgeIOS()hook, backed by iOS 27.1'sUITraitCollection.verticalBarEdge. Both return'leading','trailing', ornullwhen the system places no vertical bar.StatusBarManagergains an optional synchronousgetVerticalBarEdgethat reads the key window's traits on the main queue, and averticalBarEdgeDidChangeevent from trait change registration.__IPHONE_OS_VERSION_MAX_ALLOWEDfor older SDKs and byavailableat runtime.hiddenandStatusBar.setHidden()have no effect on iPhone Duo.On other platforms, both return
null. Expo ships the same API inexpo-status-bar(expo/expo#51927), and will defer to this one when available.Use case
This allows JS code in apps to understand and progressively enhance for iPhone Duo (e.g. custom side rail toolbars), without explicitly doing a device name check.
Changelog:
[iOS][Added] -
StatusBar.getVerticalBarEdgeIOS()anduseVerticalBarEdgeIOS()(vertical bar on iPhone Duo)Test Plan
yarn jest packages/react-native/Libraries/Components/StatusBar: all tests pass, including a new one for the hookyarn flow-check: 0 errorsyarn build-types --validate: API snapshot up to dateyarn test-generated-typescript: passesyarn format-check-javascriptandyarn format-check-cpp: pass for the changed filesxcodebuild -workspace RNTesterPods.xcworkspace -scheme RNTester -sdk iphonesimulator, using Xcode 27.1python -m scripts.cxx-api.parserwith Doxygen 1.16.1, matching CI: the four ReactApple snapshots gaingetVerticalBarEdge. The ReactAndroid views fail locally with Doxygen'sIdentifier basic_appender already existserror infmt's headers, which this change doesn't touch.On the iPhone Duo simulator (iOS 27.1), RNTester's StatusBar → "StatusBar vertical bar edge" example reads
trailingon the folded display. With RNTester still running, I unfolded the Duo and moved RNTester to the left pane in Split View, and the example updated toleadingthrough the change event.Not run: an iPhone without a vertical bar, where the example should read
none.