From f898207faff423875bb2c913e59934572e792e12 Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 30 Oct 2026 14:54:27 -0700 Subject: [PATCH] Delete dead RCTBridge Inspector category header (#59436) Summary: The `RCTBridge (Inspector)` category exposes `inspectorTarget`/`inspectable` with zero callers; the modern inspector reaches `RCTHost` directly. Delete the header, its buck entry, the unused imports, and the proxy shim. Changelog: [iOS][Removed] - Remove unused `RCTBridge (Inspector)` category Reviewed By: andrewdacenko Differential Revision: D127294775 --- .../React/Base/RCTBridge+Inspector.h | 30 ------------------- packages/react-native/React/Base/RCTBridge.mm | 1 - .../react-native/React/Base/RCTBridgeProxy.mm | 9 ------ .../React/CoreModules/RCTDevSettings.mm | 1 - .../platform/ios/ReactCommon/RCTInstance.mm | 1 - .../api-snapshots/ReactAppleDebugCxx.api | 5 ---- .../api-snapshots/ReactAppleFrameworksCxx.api | 5 ---- .../api-snapshots/ReactAppleNewarchCxx.api | 5 ---- .../api-snapshots/ReactAppleReleaseCxx.api | 5 ---- 9 files changed, 62 deletions(-) delete mode 100644 packages/react-native/React/Base/RCTBridge+Inspector.h diff --git a/packages/react-native/React/Base/RCTBridge+Inspector.h b/packages/react-native/React/Base/RCTBridge+Inspector.h deleted file mode 100644 index 66fca692bf05..000000000000 --- a/packages/react-native/React/Base/RCTBridge+Inspector.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#import - -#ifdef __cplusplus -#import -#endif - -@interface RCTBridge (Inspector) - -/** - * The HostTarget for this bridge, if one has been created. Exposed for RCTCxxBridge only. - */ -@property (nonatomic, assign, readonly) -#ifdef __cplusplus - facebook::react::jsinspector_modern::HostTarget * -#else - // The inspector infrastructure cannot be used in C or Swift code. - void * -#endif - inspectorTarget; - -@property (nonatomic, readonly, getter=isInspectable) BOOL inspectable; - -@end diff --git a/packages/react-native/React/Base/RCTBridge.mm b/packages/react-native/React/Base/RCTBridge.mm index 93d5bd2344d0..afdd7cabe0df 100644 --- a/packages/react-native/React/Base/RCTBridge.mm +++ b/packages/react-native/React/Base/RCTBridge.mm @@ -6,7 +6,6 @@ */ #import "RCTBridge.h" -#import "RCTBridge+Inspector.h" #import "RCTBridge+Private.h" #import diff --git a/packages/react-native/React/Base/RCTBridgeProxy.mm b/packages/react-native/React/Base/RCTBridgeProxy.mm index 105683fbc4ad..6a79668c4628 100644 --- a/packages/react-native/React/Base/RCTBridgeProxy.mm +++ b/packages/react-native/React/Base/RCTBridgeProxy.mm @@ -335,15 +335,6 @@ - (void)_immediatelyCallTimer:(NSNumber *)timer [self logWarning:@"This method is not supported. Nooping." cmd:_cmd]; } -/** - * RCTBridge (Inspector) - */ -- (BOOL)inspectable -{ - [self logWarning:@"This method is not supported. Returning NO." cmd:_cmd]; - return NO; -} - /** * RCTBridge (RCTUIManager) */ diff --git a/packages/react-native/React/CoreModules/RCTDevSettings.mm b/packages/react-native/React/CoreModules/RCTDevSettings.mm index 0c8eb0cc091c..68b6b77aa2c9 100644 --- a/packages/react-native/React/CoreModules/RCTDevSettings.mm +++ b/packages/react-native/React/CoreModules/RCTDevSettings.mm @@ -10,7 +10,6 @@ #import #import -#import #import #import #import diff --git a/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm b/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm index e63ebc8994c5..2890e6cb5d59 100644 --- a/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm +++ b/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm @@ -12,7 +12,6 @@ #import #import #import -#import #import #import #import diff --git a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api index 101ef554362f..84df303363cd 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api @@ -5,11 +5,6 @@ category NSTextStorage(FontScaling) { public virtual void scaleFontSizeWithRatio:minimumFontSize:maximumFontSize:(CGFloat ratio, CGFloat minimumFontSize, CGFloat maximumFontSize); } -category RCTBridge(Inspector) { - public @property (assign, readonly) BOOL inspectable; - public @property (assign, readonly) facebook::react::jsinspector_modern::HostTarget* inspectorTarget; -} - category RCTBridge(RCTDevMenu) { public @property (assign, readonly) RCTDevMenu* devMenu; } diff --git a/scripts/cxx-api/api-snapshots/ReactAppleFrameworksCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleFrameworksCxx.api index ac0ccfc0ab55..9a668de6a0b3 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleFrameworksCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleFrameworksCxx.api @@ -5,11 +5,6 @@ category NSTextStorage(FontScaling) { public virtual void scaleFontSizeWithRatio:minimumFontSize:maximumFontSize:(CGFloat ratio, CGFloat minimumFontSize, CGFloat maximumFontSize); } -category RCTBridge(Inspector) { - public @property (assign, readonly) BOOL inspectable; - public @property (assign, readonly) facebook::react::jsinspector_modern::HostTarget* inspectorTarget; -} - category RCTBridge(RCTDevMenu) { public @property (assign, readonly) RCTDevMenu* devMenu; } diff --git a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api index a396e261d86c..4bf19f5c9e17 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api @@ -5,11 +5,6 @@ category NSTextStorage(FontScaling) { public virtual void scaleFontSizeWithRatio:minimumFontSize:maximumFontSize:(CGFloat ratio, CGFloat minimumFontSize, CGFloat maximumFontSize); } -category RCTBridge(Inspector) { - public @property (assign, readonly) BOOL inspectable; - public @property (assign, readonly) facebook::react::jsinspector_modern::HostTarget* inspectorTarget; -} - category RCTBridge(RCTDevMenu) { public @property (assign, readonly) RCTDevMenu* devMenu; } diff --git a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api index 1255a7730e0a..ae93365e5676 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api @@ -5,11 +5,6 @@ category NSTextStorage(FontScaling) { public virtual void scaleFontSizeWithRatio:minimumFontSize:maximumFontSize:(CGFloat ratio, CGFloat minimumFontSize, CGFloat maximumFontSize); } -category RCTBridge(Inspector) { - public @property (assign, readonly) BOOL inspectable; - public @property (assign, readonly) facebook::react::jsinspector_modern::HostTarget* inspectorTarget; -} - category RCTBridge(RCTDevMenu) { public @property (assign, readonly) RCTDevMenu* devMenu; }