Repository navigation
Reland iOS 27 StatusBar fix with tvOS guards (#59542) - #59542
Open
cipolleschi wants to merge 1 commit into
Open
cipolleschi wants to merge 1 commit into
cipolleschi wants to merge 1 commit into
Conversation
|
@cipolleschi has exported this pull request. If you are a Meta employee, you can view the originating Diff in D127817413. |
cipolleschi
pushed a commit
to cipolleschi/react-native
that referenced
this pull request
Oct 27, 2026
Summary: Fixes react#58758. Apps built with the iOS 27 SDK can no longer change the status bar through the `UIApplication` setters. Restore the view-controller-based implementation: `RCTStatusBarAppearance` stores the requested style, hidden state and animation, and the default root and Fabric modal controllers return those values. The modal preserves the appearance captured before presentation until JavaScript changes it. Apps must set `UIViewControllerBasedStatusBarAppearance` to `YES` on iOS 27. Custom root view controllers must return the `RCTStatusBarAppearance` values. Apps using `NO` retain the legacy setters on older SDKs and receive a one-time warning where those setters are ineffective. Exclude the appearance helper and status-bar controller code on tvOS, where UIKit's status-bar types and APIs are unavailable. Guard the modal capture declaration and call as well as its state and implementation. The iOS code paths are unchanged. Test Plan: - Built the full `AirwaveBurbn` app and package for appletvos-arm64 with the Airwave mode, local build flavour, Pika 27 and Xcode 27.1. Code signing was skipped for local validation. Both targets passed. Buck run: https://www.internalfb.com/buck2/9c21f926-63ea-4fd5-8370-286f70fc829b. - Built `ReactApple`, `RCTFabricApple` and `RCTAppDelegateApple` with `AirwavePlatform-appletvos-arm64-local`. All passed. Buck run: https://www.internalfb.com/buck2/0aaabc5f-e893-4d9d-8ce1-a346c3315bbf. - Built `ReactApple`, `CoreModulesApple`, `RCTFabricApple` and `RCTAppDelegateApple` for iphonesimulator-arm64. All passed. Buck run: https://www.internalfb.com/buck2/876de6d7-fbd8-439f-bdbe-d4fed3d29a91. - Regenerated all C++ API snapshots. Only the four ReactApple snapshots changed, each adding `RCTStatusBarAppearance`; no private API appeared. Ran the snapshot target with `--validate`; all 12 snapshots passed. Validation run: https://www.internalfb.com/buck2/a8fc85da-ba96-4b3b-a741-afede29b5f0d. - Meta-managed clang-format, `arc f` and `arc lint` passed. - Independent read-only review found no blockers in the tvOS guards and confirmed that the iOS implementation matches the original landed change apart from platform guards. - Restored the original 12 `RCTStatusBarAppearanceTests` XCTest cases. These remain registered in the OSS Xcode test target, have no internal Buck owner, and were not run locally. No simulator runtime verification was performed. - The manual Sandcastle smoke launcher defaulted to iphoneos rather than appletvos. Its build and baseline retry failed target-compatibility checks before compiling. Do not count the launcher success as a passing tvOS build; the full tvOS validation is the local Buck run above. Child run: https://www.internalfb.com/intern/sandcastle/instance/40532397437851209/. - Diff-time CI currently has a non-bypassable `github-export-checks` failure because this new diff has no linked/exported GitHub PR. Export at https://www.internalfb.com/intern/opensource/export/preview/D127817413/ and rerun the check before landing. Other CI jobs are still running. - General Reviewer flagged a modal-state edge case also present in the original patch: changing a JS status-bar value and then returning to its capture-time value can restore the pre-modal native appearance. That warning remains unresolved for review; this re-land deliberately preserves the original iOS behaviour. Reviewed By: andrewdacenko Differential Revision: D127817413 Pulled By: cipolleschi
cipolleschi
force-pushed
the
export-D127817413
branch
from
October 27, 2026 16:46
e8e63a5 to
33b8100
Compare
Visual regression1 visual difference(s) at android: no capture ios
|
cipolleschi
force-pushed
the
export-D127817413
branch
from
October 28, 2026 10:43
33b8100 to
7e5df66
Compare
cipolleschi
pushed a commit
to cipolleschi/react-native
that referenced
this pull request
Oct 28, 2026
Summary: Fixes react#58758. Apps built with the iOS 27 SDK can no longer change the status bar through the `UIApplication` setters. Restore the view-controller-based implementation: `RCTStatusBarAppearance` stores the requested style, hidden state and animation, and the default root and Fabric modal controllers return those values. The modal preserves the appearance captured before presentation until JavaScript changes it. Apps must set `UIViewControllerBasedStatusBarAppearance` to `YES` on iOS 27. Custom root view controllers must return the `RCTStatusBarAppearance` values. Apps using `NO` retain the legacy setters on older SDKs and receive a one-time warning where those setters are ineffective. Exclude the appearance helper and status-bar controller code on tvOS, where UIKit's status-bar types and APIs are unavailable. Guard the modal capture declaration and call as well as its state and implementation. The iOS code paths are unchanged. Test Plan: - Built the full `AirwaveBurbn` app and package for appletvos-arm64 with the Airwave mode, local build flavour, Pika 27 and Xcode 27.1. Code signing was skipped for local validation. Both targets passed. Buck run: https://www.internalfb.com/buck2/9c21f926-63ea-4fd5-8370-286f70fc829b. - Built `ReactApple`, `RCTFabricApple` and `RCTAppDelegateApple` with `AirwavePlatform-appletvos-arm64-local`. All passed. Buck run: https://www.internalfb.com/buck2/0aaabc5f-e893-4d9d-8ce1-a346c3315bbf. - Built `ReactApple`, `CoreModulesApple`, `RCTFabricApple` and `RCTAppDelegateApple` for iphonesimulator-arm64. All passed. Buck run: https://www.internalfb.com/buck2/876de6d7-fbd8-439f-bdbe-d4fed3d29a91. - Regenerated all C++ API snapshots. Only the four ReactApple snapshots changed, each adding `RCTStatusBarAppearance`; no private API appeared. Ran the snapshot target with `--validate`; all 12 snapshots passed. Validation run: https://www.internalfb.com/buck2/a8fc85da-ba96-4b3b-a741-afede29b5f0d. - Meta-managed clang-format, `arc f` and `arc lint` passed. - Independent read-only review found no blockers in the tvOS guards and confirmed that the iOS implementation matches the original landed change apart from platform guards. - Restored the original 12 `RCTStatusBarAppearanceTests` XCTest cases. These remain registered in the OSS Xcode test target, have no internal Buck owner, and were not run locally. No simulator runtime verification was performed. - The manual Sandcastle smoke launcher defaulted to iphoneos rather than appletvos. Its build and baseline retry failed target-compatibility checks before compiling. Do not count the launcher success as a passing tvOS build; the full tvOS validation is the local Buck run above. Child run: https://www.internalfb.com/intern/sandcastle/instance/40532397437851209/. - Diff-time CI currently has a non-bypassable `github-export-checks` failure because this new diff has no linked/exported GitHub PR. Export at https://www.internalfb.com/intern/opensource/export/preview/D127817413/ and rerun the check before landing. Other CI jobs are still running. - General Reviewer flagged a modal-state edge case also present in the original patch: changing a JS status-bar value and then returning to its capture-time value can restore the pre-modal native appearance. That warning remains unresolved for review; this re-land deliberately preserves the original iOS behaviour. Reviewed By: andrewdacenko Differential Revision: D127817413 Pulled By: cipolleschi
cipolleschi
pushed a commit
to cipolleschi/react-native
that referenced
this pull request
Oct 28, 2026
Summary: Fixes react#58758. Apps built with the iOS 27 SDK can no longer change the status bar through the `UIApplication` setters. Restore the view-controller-based implementation: `RCTStatusBarAppearance` stores the requested style, hidden state and animation, and the default root and Fabric modal controllers return those values. The modal preserves the appearance captured before presentation until JavaScript changes it. Apps must set `UIViewControllerBasedStatusBarAppearance` to `YES` on iOS 27. Custom root view controllers must return the `RCTStatusBarAppearance` values. Apps using `NO` retain the legacy setters on older SDKs and receive a one-time warning where those setters are ineffective. Exclude the appearance helper and status-bar controller code on tvOS, where UIKit's status-bar types and APIs are unavailable. Guard the modal capture declaration and call as well as its state and implementation. The iOS code paths are unchanged. Test Plan: - Built the full `AirwaveBurbn` app and package for appletvos-arm64 with the Airwave mode, local build flavour, Pika 27 and Xcode 27.1. Code signing was skipped for local validation. Both targets passed. Buck run: https://www.internalfb.com/buck2/9c21f926-63ea-4fd5-8370-286f70fc829b. - Built `ReactApple`, `RCTFabricApple` and `RCTAppDelegateApple` with `AirwavePlatform-appletvos-arm64-local`. All passed. Buck run: https://www.internalfb.com/buck2/0aaabc5f-e893-4d9d-8ce1-a346c3315bbf. - Built `ReactApple`, `CoreModulesApple`, `RCTFabricApple` and `RCTAppDelegateApple` for iphonesimulator-arm64. All passed. Buck run: https://www.internalfb.com/buck2/876de6d7-fbd8-439f-bdbe-d4fed3d29a91. - Regenerated all C++ API snapshots. Only the four ReactApple snapshots changed, each adding `RCTStatusBarAppearance`; no private API appeared. Ran the snapshot target with `--validate`; all 12 snapshots passed. Validation run: https://www.internalfb.com/buck2/a8fc85da-ba96-4b3b-a741-afede29b5f0d. - Meta-managed clang-format, `arc f` and `arc lint` passed. - Independent read-only review found no blockers in the tvOS guards and confirmed that the iOS implementation matches the original landed change apart from platform guards. - Restored the original 12 `RCTStatusBarAppearanceTests` XCTest cases. These remain registered in the OSS Xcode test target, have no internal Buck owner, and were not run locally. No simulator runtime verification was performed. - The manual Sandcastle smoke launcher defaulted to iphoneos rather than appletvos. Its build and baseline retry failed target-compatibility checks before compiling. Do not count the launcher success as a passing tvOS build; the full tvOS validation is the local Buck run above. Child run: https://www.internalfb.com/intern/sandcastle/instance/40532397437851209/. - Diff-time CI currently has a non-bypassable `github-export-checks` failure because this new diff has no linked/exported GitHub PR. Export at https://www.internalfb.com/intern/opensource/export/preview/D127817413/ and rerun the check before landing. Other CI jobs are still running. - General Reviewer flagged a modal-state edge case also present in the original patch: changing a JS status-bar value and then returning to its capture-time value can restore the pre-modal native appearance. That warning remains unresolved for review; this re-land deliberately preserves the original iOS behaviour. Reviewed By: andrewdacenko Differential Revision: D127817413 Pulled By: cipolleschi
cipolleschi
force-pushed
the
export-D127817413
branch
from
October 28, 2026 10:52
7e5df66 to
1a1c48c
Compare
Summary: Fixes react#58758. Apps built with the iOS 27 SDK can no longer change the status bar through the `UIApplication` setters. Restore the view-controller-based implementation: `RCTStatusBarAppearance` stores the requested style, hidden state and animation, and the default root and Fabric modal controllers return those values. The modal preserves the appearance captured before presentation until JavaScript changes it. Apps must set `UIViewControllerBasedStatusBarAppearance` to `YES` on iOS 27. Custom root view controllers must return the `RCTStatusBarAppearance` values. Apps using `NO` retain the legacy setters on older SDKs and receive a one-time warning where those setters are ineffective. Exclude the appearance helper and status-bar controller code on tvOS, where UIKit's status-bar types and APIs are unavailable. Guard the modal capture declaration and call as well as its state and implementation. The iOS code paths are unchanged. Test Plan: - Built the full `AirwaveBurbn` app and package for appletvos-arm64 with the Airwave mode, local build flavour, Pika 27 and Xcode 27.1. Code signing was skipped for local validation. Both targets passed. Buck run: https://www.internalfb.com/buck2/9c21f926-63ea-4fd5-8370-286f70fc829b. - Built `ReactApple`, `RCTFabricApple` and `RCTAppDelegateApple` with `AirwavePlatform-appletvos-arm64-local`. All passed. Buck run: https://www.internalfb.com/buck2/0aaabc5f-e893-4d9d-8ce1-a346c3315bbf. - Built `ReactApple`, `CoreModulesApple`, `RCTFabricApple` and `RCTAppDelegateApple` for iphonesimulator-arm64. All passed. Buck run: https://www.internalfb.com/buck2/876de6d7-fbd8-439f-bdbe-d4fed3d29a91. - Regenerated all C++ API snapshots. Only the four ReactApple snapshots changed, each adding `RCTStatusBarAppearance`; no private API appeared. Ran the snapshot target with `--validate`; all 12 snapshots passed. Validation run: https://www.internalfb.com/buck2/a8fc85da-ba96-4b3b-a741-afede29b5f0d. - Meta-managed clang-format, `arc f` and `arc lint` passed. - Independent read-only review found no blockers in the tvOS guards and confirmed that the iOS implementation matches the original landed change apart from platform guards. - Restored the original 12 `RCTStatusBarAppearanceTests` XCTest cases. These remain registered in the OSS Xcode test target, have no internal Buck owner, and were not run locally. No simulator runtime verification was performed. - The manual Sandcastle smoke launcher defaulted to iphoneos rather than appletvos. Its build and baseline retry failed target-compatibility checks before compiling. Do not count the launcher success as a passing tvOS build; the full tvOS validation is the local Buck run above. Child run: https://www.internalfb.com/intern/sandcastle/instance/40532397437851209/. - Diff-time CI currently has a non-bypassable `github-export-checks` failure because this new diff has no linked/exported GitHub PR. Export at https://www.internalfb.com/intern/opensource/export/preview/D127817413/ and rerun the check before landing. Other CI jobs are still running. - General Reviewer flagged a modal-state edge case also present in the original patch: changing a JS status-bar value and then returning to its capture-time value can restore the pre-modal native appearance. That warning remains unresolved for review; this re-land deliberately preserves the original iOS behaviour. Reviewed By: andrewdacenko Differential Revision: D127817413 Pulled By: cipolleschi
cipolleschi
force-pushed
the
export-D127817413
branch
from
October 28, 2026 13:36
1a1c48c to
2e2ad34
Compare
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:
Fixes #58758.
Apps built with the iOS 27 SDK can no longer change the status bar through the
UIApplicationsetters. Restore the view-controller-based implementation:RCTStatusBarAppearancestores the requested style, hidden state and animation, and the default root and Fabric modal controllers return those values. The modal preserves the appearance captured before presentation until JavaScript changes it.Apps must set
UIViewControllerBasedStatusBarAppearancetoYESon iOS 27. Custom root view controllers must return theRCTStatusBarAppearancevalues. Apps usingNOretain the legacy setters on older SDKs and receive a one-time warning where those setters are ineffective.Exclude the appearance helper and status-bar controller code on tvOS, where UIKit's status-bar types and APIs are unavailable. Guard the modal capture declaration and call as well as its state and implementation. The iOS code paths are unchanged.
Test Plan:
AirwaveBurbnapp and package for appletvos-arm64 with the Airwave mode, local build flavour, Pika 27 and Xcode 27.1. Code signing was skipped for local validation. Both targets passed. Buck run: https://www.internalfb.com/buck2/9c21f926-63ea-4fd5-8370-286f70fc829b.ReactApple,RCTFabricAppleandRCTAppDelegateApplewithAirwavePlatform-appletvos-arm64-local. All passed. Buck run: https://www.internalfb.com/buck2/0aaabc5f-e893-4d9d-8ce1-a346c3315bbf.ReactApple,CoreModulesApple,RCTFabricAppleandRCTAppDelegateApplefor iphonesimulator-arm64. All passed. Buck run: https://www.internalfb.com/buck2/876de6d7-fbd8-439f-bdbe-d4fed3d29a91.RCTStatusBarAppearance; no private API appeared. Ran the snapshot target with--validate; all 12 snapshots passed. Validation run: https://www.internalfb.com/buck2/a8fc85da-ba96-4b3b-a741-afede29b5f0d.arc fandarc lintpassed.RCTStatusBarAppearanceTestsXCTest cases. These remain registered in the OSS Xcode test target, have no internal Buck owner, and were not run locally. No simulator runtime verification was performed.github-export-checksfailure because this new diff has no linked/exported GitHub PR. Export at https://www.internalfb.com/intern/opensource/export/preview/D127817413/ and rerun the check before landing. Other CI jobs are still running.Reviewed By: andrewdacenko
Differential Revision: D127817413
Pulled By: cipolleschi