From 39485504999dfd5e153ef894176e4a296e894f46 Mon Sep 17 00:00:00 2001 From: Shawn Dempsey Date: Tue, 21 Jul 2026 18:02:44 -0700 Subject: [PATCH] Downgrade RCTStatusBarManager error to a warning under VC-based status bar (#57631) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: `RCTStatusBarManager`'s `setStyle:` and `setHidden:` already no-op when `UIViewControllerBasedStatusBarAppearance` is `YES`. Currently this path emits `RCTLogError`, which redboxes in dev and logs a soft error in release — even though the call is an expected no-op when the view controller owns the status bar. Downgrade to `RCTLogWarn` with a more accurate message so apps adopting VC-based status bar appearance aren't flooded with spurious errors on every `StatusBar.setBarStyle` / `setHidden` call or `` mount. No behavior change; the methods remain no-ops under the flag. Changelog: [iOS][Changed] - Downgrade RCTStatusBarManager error to a warning when UIViewControllerBasedStatusBarAppearance is YES Differential Revision: D113043635 --- .../react-native/React/CoreModules/RCTStatusBarManager.mm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react-native/React/CoreModules/RCTStatusBarManager.mm b/packages/react-native/React/CoreModules/RCTStatusBarManager.mm index b3e2c7e16db6..d81528189014 100644 --- a/packages/react-native/React/CoreModules/RCTStatusBarManager.mm +++ b/packages/react-native/React/CoreModules/RCTStatusBarManager.mm @@ -148,8 +148,8 @@ - (void)applicationWillChangeStatusBarFrame:(NSNotification *)notification dispatch_async(dispatch_get_main_queue(), ^{ UIStatusBarStyle statusBarStyle = [RCTConvert UIStatusBarStyle:style]; if (RCTViewControllerBasedStatusBarAppearance()) { - RCTLogError(@"RCTStatusBarManager module requires that the \ - UIViewControllerBasedStatusBarAppearance key in the Info.plist is set to NO"); + RCTLogWarn(@"RCTStatusBarManager is a no-op when \ + UIViewControllerBasedStatusBarAppearance is YES; set the status bar from your view controller instead"); } else { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" @@ -164,8 +164,8 @@ - (void)applicationWillChangeStatusBarFrame:(NSNotification *)notification dispatch_async(dispatch_get_main_queue(), ^{ UIStatusBarAnimation animation = [RCTConvert UIStatusBarAnimation:withAnimation]; if (RCTViewControllerBasedStatusBarAppearance()) { - RCTLogError(@"RCTStatusBarManager module requires that the \ - UIViewControllerBasedStatusBarAppearance key in the Info.plist is set to NO"); + RCTLogWarn(@"RCTStatusBarManager is a no-op when \ + UIViewControllerBasedStatusBarAppearance is YES; set the status bar from your view controller instead"); } else { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations"