diff --git a/React/CxxBridge/RCTCxxBridge.mm b/React/CxxBridge/RCTCxxBridge.mm index d8938d7033a24e..a9bea58741a7a0 100644 --- a/React/CxxBridge/RCTCxxBridge.mm +++ b/React/CxxBridge/RCTCxxBridge.mm @@ -336,7 +336,7 @@ - (void)start if (!self.executorClass) { if ([self.delegate conformsToProtocol:@protocol(RCTCxxBridgeDelegate)]) { id cxxDelegate = (id)self.delegate; - executorFactory = [cxxDelegate jsExecutorFactoryForBridge:self]; + executorFactory = std::make_shared(*reinterpret_cast([cxxDelegate jsExecutorFactoryForBridge:self])); } if (!executorFactory) { executorFactory = std::make_shared(nullptr); diff --git a/React/CxxBridge/RCTCxxBridgeDelegate.h b/React/CxxBridge/RCTCxxBridgeDelegate.h index c574eee4fe5cdf..8e19f3f4208302 100644 --- a/React/CxxBridge/RCTCxxBridgeDelegate.h +++ b/React/CxxBridge/RCTCxxBridgeDelegate.h @@ -28,6 +28,6 @@ class JSExecutorFactory; * If not implemented, or returns an empty pointer, JSIExecutorFactory * will be used with a JSCRuntime. */ -- (std::unique_ptr)jsExecutorFactoryForBridge:(RCTBridge *)bridge; +- (void *)jsExecutorFactoryForBridge:(RCTBridge *)bridge; @end