66 */
77
88#import " RCTBridgeProxy.h"
9- #import " RCTBridgeProxy+Cxx.h"
109
1110#import < React/RCTBridge+Private.h>
1211#import < React/RCTBridge.h>
1312#import < React/RCTLog.h>
1413#import < React/RCTUIManager.h>
15- #import < ReactCommon/CallInvoker.h>
1614#import < jsi/jsi.h>
1715
1816using namespace facebook ;
@@ -24,12 +22,6 @@ - (NSMethodSignature *)methodSignatureForSelector:(SEL)sel;
2422- (void )forwardInvocation : (NSInvocation *)invocation ;
2523@end
2624
27- @interface RCTBridgeProxy ()
28-
29- @property (nonatomic , readwrite ) std::shared_ptr<facebook::react::CallInvoker> jsCallInvoker;
30-
31- @end
32-
3325@implementation RCTBridgeProxy {
3426 RCTUIManagerProxy *_uiManagerProxy;
3527 RCTModuleRegistry *_moduleRegistry;
@@ -38,7 +30,6 @@ @implementation RCTBridgeProxy {
3830 NSDictionary *_launchOptions;
3931 void (^_dispatchToJSThread)(dispatch_block_t );
4032 void (^_registerSegmentWithId)(NSNumber *, NSString *);
41- void *_runtime;
4233}
4334
4435@synthesize performanceLogger = _performanceLogger;
@@ -62,7 +53,6 @@ - (instancetype)initWithViewRegistry:(RCTViewRegistry *)viewRegistry
6253 _callableJSModules = callableJSModules;
6354 _dispatchToJSThread = dispatchToJSThread;
6455 _registerSegmentWithId = registerSegmentWithId;
65- _runtime = runtime;
6656 _launchOptions = [launchOptions copy ];
6757 }
6858
@@ -92,22 +82,6 @@ - (Class)executorClass
9282 return nil ;
9383}
9484
95- /* *
96- * Used By:
97- * - RCTBlobCollector
98- */
99- - (void *)runtime
100- {
101- [self logWarning: @" Please migrate to C++ TurboModule or RuntimeExecutor." cmd: _cmd ];
102- return _runtime;
103- }
104-
105- - (std::shared_ptr<facebook::react::CallInvoker>)jsCallInvoker
106- {
107- [self logWarning: @" Please migrate to RuntimeExecutor" cmd: _cmd ];
108- return _jsCallInvoker;
109- }
110-
11185/* *
11286 * RCTModuleRegistry
11387 */
@@ -241,61 +215,16 @@ - (BOOL)isBatchActive
241215 return NO ;
242216}
243217
244- /* *
245- * RCTBridge ()
246- */
247-
248- - (NSString *)bridgeDescription
249- {
250- [self logWarning: @" This method is not supported. Returning \" BridgeProxy\" ." cmd: _cmd ];
251- return @" BridgeProxy" ;
252- }
253-
254218- (void )enqueueCallback : (NSNumber *)cbID args : (NSArray *)args
255219{
256220 [self logError: @" This method is not supported. No-oping." cmd: _cmd ];
257221}
258222
259- - (RCTBridge *)batchedBridge
260- {
261- [self logWarning: @" This method is not supported. Returning bridge proxy." cmd: _cmd ];
262- return (RCTBridge *)self;
263- }
264-
265- - (void )setBatchedBridge
266- {
267- [self logError: @" This method is not supported. No-oping." cmd: _cmd ];
268- }
269-
270- - (RCTBridgeModuleListProvider)moduleProvider
271- {
272- [self logWarning: @" This method is not supported. Returning empty block" cmd: _cmd ];
273- return ^{
274- return @[];
275- };
276- }
277-
278223- (RCTModuleRegistry *)moduleRegistry
279224{
280225 return _moduleRegistry;
281226}
282227
283- /* *
284- * RCTBridge (RCTCxxBridge)
285- */
286-
287- - (RCTBridge *)parentBridge
288- {
289- [self logWarning: @" This method is not supported. Returning bridge proxy." cmd: _cmd ];
290- return (RCTBridge *)self;
291- }
292-
293- - (BOOL )moduleSetupComplete
294- {
295- [self logWarning: @" This method is not supported. Returning YES." cmd: _cmd ];
296- return YES ;
297- }
298-
299228- (void )registerAdditionalModuleClasses : (NSArray <Class> *)newModules
300229{
301230 [self
@@ -304,37 +233,6 @@ - (void)registerAdditionalModuleClasses:(NSArray<Class> *)newModules
304233 cmd: _cmd ];
305234}
306235
307- - (void )updateModuleWithInstance : (id <RCTBridgeModule>)instance
308- {
309- [self logError: @" This method is not supported. Nooping." cmd: _cmd ];
310- }
311-
312- - (void )startProfiling
313- {
314- [self logWarning: @" This method is not supported. Nooping." cmd: _cmd ];
315- }
316-
317- - (void )stopProfiling : (void (^)(NSData *))callback
318- {
319- [self logWarning: @" This method is not supported. Nooping." cmd: _cmd ];
320- }
321-
322- - (id )callNativeModule : (NSUInteger )moduleID method : (NSUInteger )methodID params : (NSArray *)params
323- {
324- [self logError: @" This method is not supported. Nooping and returning nil." cmd: _cmd ];
325- return nil ;
326- }
327-
328- - (void )logMessage : (NSString *)message level : (NSString *)level
329- {
330- [self logWarning: @" This method is not supported. Nooping." cmd: _cmd ];
331- }
332-
333- - (void )_immediatelyCallTimer : (NSNumber *)timer
334- {
335- [self logWarning: @" This method is not supported. Nooping." cmd: _cmd ];
336- }
337-
338236/* *
339237 * RCTBridge (RCTUIManager)
340238 */
@@ -343,11 +241,6 @@ - (RCTUIManager *)uiManager
343241 return (RCTUIManager *)_uiManagerProxy;
344242}
345243
346- - (RCTBridgeProxy *)object
347- {
348- return self;
349- }
350-
351244/* *
352245 * NSProxy setup
353246 */
0 commit comments