Skip to content

Commit c09588f

Browse files
christophpurrermeta-codesync[bot]
authored andcommitted
Sweep dead imports and stale bridge comments (#59442)
Summary: Pull Request resolved: #59442 Remove dead imports and forward declarations left behind by the bridge cleanup (`RCTRootView.m`, `RCTCxxUtils`, `RCTRootViewFactory.h`) and fix two comments that still describe the removed bridge behavior. Changelog: [Internal] Reviewed By: andrewdacenko Differential Revision: D127295291
1 parent a297542 commit c09588f

6 files changed

Lines changed: 2 additions & 25 deletions

File tree

‎packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@
1111
#import <React/RCTUtils.h>
1212
#import "RCTJSRuntimeConfiguratorProtocol.h"
1313

14-
@protocol RCTComponentViewFactoryComponentProvider;
1514
@protocol RCTTurboModuleManagerDelegate;
1615
@protocol RCTHostDelegate;
1716
@class RCTBridge;
1817
@class RCTHost;
1918
@class RCTRootView;
20-
@class RCTSurfacePresenterBridgeAdapter;
2119
@class RCTBundleConfiguration;
2220
@class RCTDevMenuConfiguration;
2321

‎packages/react-native/React/Base/RCTRootView.m‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,6 @@
66
*/
77

88
#import "RCTRootView.h"
9-
#import "RCTRootViewDelegate.h"
10-
11-
#import <objc/runtime.h>
12-
13-
#import "RCTAssert.h"
14-
#import "RCTConstants.h"
15-
#import "RCTKeyCommands.h"
16-
#import "RCTLog.h"
17-
#import "RCTPerformanceLogger.h"
18-
#import "RCTTouchHandler.h"
19-
#import "RCTUIManager.h"
20-
#import "RCTUIManagerUtils.h"
21-
#import "RCTUtils.h"
22-
#import "RCTView.h"
23-
#import "UIView+React.h"
249

2510
NSString *const RCTContentDidAppearNotification = @"RCTContentDidAppearNotification";
2611

‎packages/react-native/React/CoreModules/RCTRedBox.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ typedef void (^RCTRedBoxButtonPressHandler)(void);
3939

4040
- (void)addCustomButton:(NSString *)title onPressHandler:(RCTRedBoxButtonPressHandler)handler;
4141

42-
/** Overrides bridge.bundleURL. Modify on main thread only. You shouldn't need to use this. */
42+
/** Overrides the bundle manager's bundleURL. Modify on main thread only. You shouldn't need to use this. */
4343
@property (nonatomic, strong) NSURL *overrideBundleURL;
4444

45-
/** Overrides the default behavior of calling [bridge reload] on reload. You shouldn't need to use this. */
45+
/** Overrides the default behavior of triggering a reload command on reload. You shouldn't need to use this. */
4646
@property (nonatomic, strong) dispatch_block_t overrideReloadAction;
4747

4848
@end

‎packages/react-native/React/CxxModule/RCTCxxUtils.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
#import <Foundation/Foundation.h>
1212

13-
@class RCTBridge;
14-
1513
namespace facebook::react {
1614

1715
class Instance;

‎packages/react-native/React/CxxModule/RCTCxxUtils.mm‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#import "RCTCxxUtils.h"
99

1010
#import <React/RCTUtils.h>
11-
#import <cxxreact/CxxNativeModule.h>
1211
#import <jsi/jsi.h>
1312

1413
namespace facebook::react {

‎packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@
5656
* These modules shouldn't be TurboModule-compatible (i.e: they should not conform to RCTTurboModule).
5757
*
5858
* This method is only used by the TurboModule interop layer.
59-
*
60-
* It must match the signature of RCTBridgeDelegate extraModulesForBridge:
61-
* - (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge;
6259
*/
6360
- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge
6461
__attribute((deprecated("Please make all native modules returned from this method TurboModule-compatible.")));

0 commit comments

Comments
 (0)