mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-11-01 13:53:11 +08:00
feat: support for new architecture
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
#import "RCTPushy.h"
|
||||
#import "RCTPushyDownloader.h"
|
||||
#import "RCTPushyManager.h"
|
||||
|
||||
// Thanks to this guard, we won't import this header when we build for the old architecture.
|
||||
#ifdef RCT_NEW_ARCH_ENABLED
|
||||
#import "RNUpdateSpec.h"
|
||||
#endif
|
||||
|
||||
#import <React/RCTConvert.h>
|
||||
#import <React/RCTLog.h>
|
||||
@@ -562,4 +565,13 @@ RCT_EXPORT_METHOD(markSuccess)
|
||||
#endif
|
||||
}
|
||||
|
||||
// Thanks to this guard, we won't compile this code when we build for the old architecture.
|
||||
#ifdef RCT_NEW_ARCH_ENABLED
|
||||
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
||||
(const facebook::react::ObjCTurboModule::InitParams &)params
|
||||
{
|
||||
return std::make_shared<facebook::react::NativeCalculatorSpecJSI>(params);
|
||||
}
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user