Skip to content

Commit 4805e5a

Browse files
committed
Simplify Apple host module provider
1 parent 478d560 commit 4805e5a

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed
Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,12 @@
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

0 commit comments

Comments
 (0)