Skip to content

Commit a81120e

Browse files
committed
Make RCTCxxBridge not care about the actual protocol implemented, only the method used
1 parent d485e41 commit a81120e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

React/CxxBridge/RCTCxxBridge.mm

+1-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ - (void)start
334334
// Prepare executor factory (shared_ptr for copy into block)
335335
std::shared_ptr<JSExecutorFactory> executorFactory;
336336
if (!self.executorClass) {
337-
if ([self.delegate conformsToProtocol:@protocol(RCTCxxBridgeDelegate)]) {
337+
if ([self.delegate respondsToSelector:@selector(jsExecutorFactoryForBridge:)]) {
338338
id<RCTCxxBridgeDelegate> cxxDelegate = (id<RCTCxxBridgeDelegate>)self.delegate;
339339
executorFactory = std::make_shared<JSCExecutorFactory>(*reinterpret_cast<JSCExecutorFactory *>([cxxDelegate jsExecutorFactoryForBridge:self]));
340340
}

0 commit comments

Comments
 (0)