From 4d82b4f15b812849f1fd0a8b8021076fa3539421 Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Tue, 20 Oct 2026 18:45:13 -0700 Subject: [PATCH 1/2] Remove dead RCTBridge synthesis from four bridgeless modules (#59250) Summary: RCTDevMenu, RCTLogBox, RCTRedBox, and RCTBlobManager synthesized the deprecated bridge property but never read it. They use moduleRegistry, bundleManager, and callableJSModules instead. Changelog: [Internal] Differential Revision: D126545276 --- packages/react-native/Libraries/Blob/RCTBlobManager.mm | 1 - packages/react-native/React/CoreModules/RCTDevMenu.mm | 1 - packages/react-native/React/CoreModules/RCTLogBox.mm | 2 -- packages/react-native/React/CoreModules/RCTRedBox.mm | 1 - 4 files changed, 5 deletions(-) diff --git a/packages/react-native/Libraries/Blob/RCTBlobManager.mm b/packages/react-native/Libraries/Blob/RCTBlobManager.mm index 4a29b1f826c9..3699a727028d 100755 --- a/packages/react-native/Libraries/Blob/RCTBlobManager.mm +++ b/packages/react-native/Libraries/Blob/RCTBlobManager.mm @@ -46,7 +46,6 @@ @implementation RCTBlobManager { RCT_EXPORT_MODULE(BlobModule) -@synthesize bridge = _bridge; @synthesize moduleRegistry = _moduleRegistry; @synthesize methodQueue = _methodQueue; diff --git a/packages/react-native/React/CoreModules/RCTDevMenu.mm b/packages/react-native/React/CoreModules/RCTDevMenu.mm index 883b4ba7f8e1..bd946190df6b 100644 --- a/packages/react-native/React/CoreModules/RCTDevMenu.mm +++ b/packages/react-native/React/CoreModules/RCTDevMenu.mm @@ -119,7 +119,6 @@ @implementation RCTDevMenu { NSMutableArray *_extraMenuItems; } -@synthesize bridge = _bridge; @synthesize moduleRegistry = _moduleRegistry; @synthesize callableJSModules = _callableJSModules; @synthesize bundleManager = _bundleManager; diff --git a/packages/react-native/React/CoreModules/RCTLogBox.mm b/packages/react-native/React/CoreModules/RCTLogBox.mm index 7e8be47170dd..9741dc29c877 100644 --- a/packages/react-native/React/CoreModules/RCTLogBox.mm +++ b/packages/react-native/React/CoreModules/RCTLogBox.mm @@ -25,8 +25,6 @@ @implementation RCTLogBox { __weak id _bridgelessSurfacePresenter; } -@synthesize bridge = _bridge; - RCT_EXPORT_MODULE() + (BOOL)requiresMainQueueSetup diff --git a/packages/react-native/React/CoreModules/RCTRedBox.mm b/packages/react-native/React/CoreModules/RCTRedBox.mm index f2edecee813d..cc1b00688f1e 100644 --- a/packages/react-native/React/CoreModules/RCTRedBox.mm +++ b/packages/react-native/React/CoreModules/RCTRedBox.mm @@ -40,7 +40,6 @@ @implementation RCTRedBox { NSMutableArray *_customButtonHandlers; } -@synthesize bridge = _bridge; @synthesize moduleRegistry = _moduleRegistry; @synthesize bundleManager = _bundleManager; From e6628ef6d9ed3e76aa6fabc6be2dae0533c883d8 Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Tue, 20 Oct 2026 18:45:13 -0700 Subject: [PATCH 2/2] Remove dead RCTBridge imports from sixteen bridgeless files Summary: Seven implementation files imported the bridge header without referencing any symbol it provides. Nine public headers either imported it redundantly or narrowed it to the module protocol header they actually need. Changelog: [Internal] Differential Revision: D126549484 --- packages/react-native/Libraries/Blob/RCTBlobManager.h | 1 - packages/react-native/Libraries/Blob/RCTFileReaderModule.mm | 1 - packages/react-native/Libraries/Image/RCTImageDataDecoder.h | 2 +- packages/react-native/Libraries/Image/RCTImageLoaderProtocol.h | 1 - packages/react-native/Libraries/Image/RCTImageURLLoader.h | 2 +- .../Libraries/PushNotificationIOS/RCTPushNotificationManager.mm | 1 - packages/react-native/Libraries/Settings/RCTSettingsManager.mm | 1 - packages/react-native/React/CoreModules/RCTActionSheetManager.h | 2 +- .../react-native/React/CoreModules/RCTActionSheetManager.mm | 1 - packages/react-native/React/CoreModules/RCTAppState.mm | 1 - packages/react-native/React/CoreModules/RCTDevLoadingView.mm | 1 - packages/react-native/React/CoreModules/RCTDeviceInfo.h | 2 +- packages/react-native/React/CoreModules/RCTEventDispatcher.h | 1 - packages/react-native/React/CoreModules/RCTLogBox.h | 1 + packages/react-native/React/CoreModules/RCTLogBox.mm | 2 +- packages/react-native/React/CoreModules/RCTLogBoxView.h | 1 - 16 files changed, 6 insertions(+), 15 deletions(-) diff --git a/packages/react-native/Libraries/Blob/RCTBlobManager.h b/packages/react-native/Libraries/Blob/RCTBlobManager.h index 59659b6ac9ce..100ea51a5df1 100755 --- a/packages/react-native/Libraries/Blob/RCTBlobManager.h +++ b/packages/react-native/Libraries/Blob/RCTBlobManager.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -#import #import #import #import diff --git a/packages/react-native/Libraries/Blob/RCTFileReaderModule.mm b/packages/react-native/Libraries/Blob/RCTFileReaderModule.mm index c33e1c05893b..630750684091 100644 --- a/packages/react-native/Libraries/Blob/RCTFileReaderModule.mm +++ b/packages/react-native/Libraries/Blob/RCTFileReaderModule.mm @@ -8,7 +8,6 @@ #import #import -#import #import #import diff --git a/packages/react-native/Libraries/Image/RCTImageDataDecoder.h b/packages/react-native/Libraries/Image/RCTImageDataDecoder.h index 1f52b4a07e7f..b8941897a115 100644 --- a/packages/react-native/Libraries/Image/RCTImageDataDecoder.h +++ b/packages/react-native/Libraries/Image/RCTImageDataDecoder.h @@ -7,7 +7,7 @@ #import -#import +#import #import #import #import diff --git a/packages/react-native/Libraries/Image/RCTImageLoaderProtocol.h b/packages/react-native/Libraries/Image/RCTImageLoaderProtocol.h index 17bc12cc7e37..a93b68f962d7 100644 --- a/packages/react-native/Libraries/Image/RCTImageLoaderProtocol.h +++ b/packages/react-native/Libraries/Image/RCTImageLoaderProtocol.h @@ -7,7 +7,6 @@ #import -#import #import #import #import diff --git a/packages/react-native/Libraries/Image/RCTImageURLLoader.h b/packages/react-native/Libraries/Image/RCTImageURLLoader.h index d0299d3fcd6a..86daffc091c7 100644 --- a/packages/react-native/Libraries/Image/RCTImageURLLoader.h +++ b/packages/react-native/Libraries/Image/RCTImageURLLoader.h @@ -7,7 +7,7 @@ #import -#import +#import #import NS_ASSUME_NONNULL_BEGIN diff --git a/packages/react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm b/packages/react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm index 25c2867c9c85..8731cf6c0cea 100644 --- a/packages/react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm +++ b/packages/react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm @@ -10,7 +10,6 @@ #import #import -#import #import #import diff --git a/packages/react-native/Libraries/Settings/RCTSettingsManager.mm b/packages/react-native/Libraries/Settings/RCTSettingsManager.mm index af0bd521f02e..212ea5a72f04 100644 --- a/packages/react-native/Libraries/Settings/RCTSettingsManager.mm +++ b/packages/react-native/Libraries/Settings/RCTSettingsManager.mm @@ -8,7 +8,6 @@ #import #import -#import #import #import #import diff --git a/packages/react-native/React/CoreModules/RCTActionSheetManager.h b/packages/react-native/React/CoreModules/RCTActionSheetManager.h index 338310b89c08..5ced60a6fe8c 100644 --- a/packages/react-native/React/CoreModules/RCTActionSheetManager.h +++ b/packages/react-native/React/CoreModules/RCTActionSheetManager.h @@ -7,7 +7,7 @@ #import -#import +#import @interface RCTActionSheetManager : NSObject diff --git a/packages/react-native/React/CoreModules/RCTActionSheetManager.mm b/packages/react-native/React/CoreModules/RCTActionSheetManager.mm index 104e0491fc22..d615eca6e8a3 100644 --- a/packages/react-native/React/CoreModules/RCTActionSheetManager.mm +++ b/packages/react-native/React/CoreModules/RCTActionSheetManager.mm @@ -13,7 +13,6 @@ #if !TARGET_OS_TV -#import #import #import #import diff --git a/packages/react-native/React/CoreModules/RCTAppState.mm b/packages/react-native/React/CoreModules/RCTAppState.mm index 7ca35bfefefd..c57bf83b6928 100644 --- a/packages/react-native/React/CoreModules/RCTAppState.mm +++ b/packages/react-native/React/CoreModules/RCTAppState.mm @@ -9,7 +9,6 @@ #import #import -#import #import #import #import diff --git a/packages/react-native/React/CoreModules/RCTDevLoadingView.mm b/packages/react-native/React/CoreModules/RCTDevLoadingView.mm index 100dc3ce064e..9b3620cb9b91 100644 --- a/packages/react-native/React/CoreModules/RCTDevLoadingView.mm +++ b/packages/react-native/React/CoreModules/RCTDevLoadingView.mm @@ -12,7 +12,6 @@ #import #import -#import #import #import #import diff --git a/packages/react-native/React/CoreModules/RCTDeviceInfo.h b/packages/react-native/React/CoreModules/RCTDeviceInfo.h index 66c2d3218552..f3bdd908c7f2 100644 --- a/packages/react-native/React/CoreModules/RCTDeviceInfo.h +++ b/packages/react-native/React/CoreModules/RCTDeviceInfo.h @@ -7,7 +7,7 @@ #import -#import +#import @interface RCTDeviceInfo : NSObject diff --git a/packages/react-native/React/CoreModules/RCTEventDispatcher.h b/packages/react-native/React/CoreModules/RCTEventDispatcher.h index 3b31791ae73d..837c68836280 100644 --- a/packages/react-native/React/CoreModules/RCTEventDispatcher.h +++ b/packages/react-native/React/CoreModules/RCTEventDispatcher.h @@ -7,7 +7,6 @@ #import -#import #import #import /** diff --git a/packages/react-native/React/CoreModules/RCTLogBox.h b/packages/react-native/React/CoreModules/RCTLogBox.h index 17f7f4d98ef8..c42b9811099d 100644 --- a/packages/react-native/React/CoreModules/RCTLogBox.h +++ b/packages/react-native/React/CoreModules/RCTLogBox.h @@ -5,6 +5,7 @@ * LICENSE file in the root directory of this source tree. */ +#import #import #import "RCTLogBoxView.h" diff --git a/packages/react-native/React/CoreModules/RCTLogBox.mm b/packages/react-native/React/CoreModules/RCTLogBox.mm index 9741dc29c877..cdadc87c601c 100644 --- a/packages/react-native/React/CoreModules/RCTLogBox.mm +++ b/packages/react-native/React/CoreModules/RCTLogBox.mm @@ -8,8 +8,8 @@ #import "RCTLogBox.h" #import -#import #import +#import #import #import #import diff --git a/packages/react-native/React/CoreModules/RCTLogBoxView.h b/packages/react-native/React/CoreModules/RCTLogBoxView.h index 56d0d7ba84ef..29bf90af5ff5 100644 --- a/packages/react-native/React/CoreModules/RCTLogBoxView.h +++ b/packages/react-native/React/CoreModules/RCTLogBoxView.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -#import #import #import #import