From 61a838d20b6febc4eb8f5535fbf89d20413419b4 Mon Sep 17 00:00:00 2001 From: Devan Buggay Date: Mon, 29 Dec 2025 21:09:43 -0800 Subject: [PATCH] Compile out RCTUIStatusBarManager (#54998) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54998 RCTUIStatusBarManager is unsupported on AppleTV Changelog: [Internal] Reviewed By: Abbondanzo Differential Revision: D89899909 fbshipit-source-id: d4919c087ab99b4f79947ec7d0b43c19a96e2262 --- packages/react-native/React/Base/RCTUtils.h | 2 ++ packages/react-native/React/Base/RCTUtils.mm | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/react-native/React/Base/RCTUtils.h b/packages/react-native/React/Base/RCTUtils.h index 6fa772038ef..aaa0bd237d9 100644 --- a/packages/react-native/React/Base/RCTUtils.h +++ b/packages/react-native/React/Base/RCTUtils.h @@ -101,7 +101,9 @@ RCT_EXTERN UIWindow *__nullable RCTKeyWindow(void); RCT_EXTERN UIViewController *__nullable RCTPresentedViewController(void); // Retrieve current window UIStatusBarManager +#if !TARGET_OS_TV RCT_EXTERN UIStatusBarManager *__nullable RCTUIStatusBarManager(void) API_AVAILABLE(ios(13)); +#endif // Does this device support force touch (aka 3D Touch)? RCT_EXTERN BOOL RCTForceTouchAvailable(void); diff --git a/packages/react-native/React/Base/RCTUtils.mm b/packages/react-native/React/Base/RCTUtils.mm index 20503a564df..e6f8aa1062b 100644 --- a/packages/react-native/React/Base/RCTUtils.mm +++ b/packages/react-native/React/Base/RCTUtils.mm @@ -635,10 +635,12 @@ UIWindow *__nullable RCTKeyWindow(void) return nil; } +#if !TARGET_OS_TV UIStatusBarManager *__nullable RCTUIStatusBarManager(void) { return RCTKeyWindow().windowScene.statusBarManager; } +#endif UIViewController *__nullable RCTPresentedViewController(void) {