File tree Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change 11#import " CxxNodeApiHostModule.hpp"
22#import " WeakNodeApiInjector.hpp"
33
4- #define USE_CXX_TURBO_MODULE_UTILS 0
5- #if defined(__has_include)
6- #if __has_include(<ReactCommon/CxxTurboModuleUtils.h>)
7- #undef USE_CXX_TURBO_MODULE_UTILS
8- #define USE_CXX_TURBO_MODULE_UTILS 1
9- #endif
10- #endif
11-
12- #if USE_CXX_TURBO_MODULE_UTILS
134#import < ReactCommon/CxxTurboModuleUtils.h>
145@interface NodeApiHost : NSObject
15- #else
16- #import < ReactCommon/RCTTurboModule.h>
17- @interface NodeApiHost : NSObject <RCTBridgeModule, RCTTurboModule>
18- #endif // USE_CXX_TURBO_MODULE_UTILS
196
207@end
218
229@implementation NodeApiHost
23- #if USE_CXX_TURBO_MODULE_UTILS
2410+ (void )load {
2511 callstack::nodeapihost::injectIntoWeakNodeApi ();
2612
@@ -31,14 +17,5 @@ + (void)load {
3117 jsInvoker);
3218 });
3319}
34- #else
35- RCT_EXPORT_MODULE ()
36-
37- - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
38- (const facebook::react::ObjCTurboModule::InitParams &)params {
39- return std::make_shared<callstack::nodeapihost::CxxNodeApiHostModule>(
40- params.jsInvoker );
41- }
42- #endif // USE_CXX_TURBO_MODULE_UTILS
4320
4421@end
You can’t perform that action at this time.
0 commit comments