freerasp-react-native 3.12.0 → 3.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -0
- package/README.md +8 -4
- package/android/build.gradle +1 -1
- package/android/gradle.properties +2 -2
- package/android/proguard-rules.pro +8 -0
- package/android/src/main/java/com/freeraspreactnative/FreeraspReactNativeModule.kt +59 -10
- package/android/src/main/java/com/freeraspreactnative/FreeraspThreatHandler.kt +8 -0
- package/android/src/main/java/com/freeraspreactnative/ScreenProtector.kt +164 -0
- package/android/src/main/java/com/freeraspreactnative/Threat.kt +5 -1
- package/android/src/main/java/com/freeraspreactnative/utils/Extensions.kt +1 -1
- package/example/Gemfile +6 -2
- package/example/Gemfile.lock +121 -0
- package/example/android/app/build.gradle +64 -265
- package/example/android/app/src/debug/AndroidManifest.xml +1 -5
- package/example/android/app/src/main/AndroidManifest.xml +5 -3
- package/example/android/app/src/main/java/com/freerasp/rn/example/MainActivity.kt +22 -0
- package/example/android/app/src/main/java/com/freerasp/rn/example/MainApplication.kt +44 -0
- package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +3 -2
- package/example/android/app/src/main/res/values/strings.xml +1 -1
- package/example/android/build.gradle +16 -45
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +3 -1
- package/example/android/gradle.properties +5 -6
- package/example/android/gradlew +30 -13
- package/example/android/gradlew.bat +21 -16
- package/example/android/settings.gradle +5 -10
- package/example/app.json +3 -3
- package/example/index.js +4 -0
- package/example/ios/FreeraspRNExample/AppDelegate.swift +30 -0
- package/example/ios/{FreeraspReactNativeExample → FreeraspRNExample}/Info.plist +8 -12
- package/example/ios/{FreeraspReactNativeExample → FreeraspRNExample}/LaunchScreen.storyboard +1 -1
- package/example/ios/FreeraspRNExample/PrivacyInfo.xcprivacy +37 -0
- package/example/ios/FreeraspRNExample.xcodeproj/project.pbxproj +488 -0
- package/example/ios/{FreeraspReactNativeExample.xcodeproj/xcshareddata/xcschemes/FreeraspReactNativeExample.xcscheme → FreeraspRNExample.xcodeproj/xcshareddata/xcschemes/FreeraspRNExample.xcscheme} +12 -12
- package/example/ios/{FreeraspReactNativeExample.xcworkspace → FreeraspRNExample.xcworkspace}/contents.xcworkspacedata +1 -1
- package/example/ios/Podfile +19 -32
- package/example/metro.config.js +13 -14
- package/example/package.json +23 -12
- package/example/src/App.tsx +18 -0
- package/example/src/DemoApp.tsx +181 -79
- package/example/src/MalwareModal.tsx +2 -12
- package/example/src/checks.ts +2 -0
- package/example/yarn.lock +2483 -1624
- package/ios/FreeraspReactNative.swift +6 -2
- package/ios/TalsecRuntime.xcframework/Info.plist +5 -5
- package/ios/TalsecRuntime.xcframework/_CodeSignature/CodeDirectory +0 -0
- package/ios/TalsecRuntime.xcframework/_CodeSignature/CodeRequirements-1 +0 -0
- package/ios/TalsecRuntime.xcframework/_CodeSignature/CodeResources +87 -87
- package/ios/TalsecRuntime.xcframework/_CodeSignature/CodeSignature +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CurlWrapper.h +1 -1
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +1 -1
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curl.h +7 -7
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/multi.h +4 -4
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/options.h +1 -1
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/urlapi.h +1 -1
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Info.plist +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.abi.json +316 -178
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.private.swiftinterface +2 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftinterface +2 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/TalsecRuntime +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CurlWrapper.h +1 -1
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +2 -2
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curl.h +7 -7
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/multi.h +4 -4
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/options.h +1 -1
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/urlapi.h +1 -1
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Info.plist +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.abi.json +316 -178
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +2 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface +2 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.abi.json +316 -178
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +2 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +2 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/TalsecRuntime +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/_CodeSignature/CodeResources +33 -33
- package/lib/commonjs/index.js +25 -3
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/threat.js +3 -1
- package/lib/commonjs/threat.js.map +1 -1
- package/lib/module/index.js +19 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/threat.js +3 -1
- package/lib/module/threat.js.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/threat.d.ts +2 -0
- package/lib/typescript/src/threat.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +2 -0
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.tsx +24 -0
- package/src/threat.ts +6 -0
- package/src/types.ts +2 -0
- package/example/android/app/_BUCK +0 -55
- package/example/android/app/build_defs.bzl +0 -19
- package/example/android/app/src/debug/java/com/freeraspreactnativeexample/ReactNativeFlipper.java +0 -73
- package/example/android/app/src/main/java/com/freeraspreactnativeexample/MainActivity.java +0 -48
- package/example/android/app/src/main/java/com/freeraspreactnativeexample/MainApplication.java +0 -91
- package/example/android/app/src/main/java/com/freeraspreactnativeexample/newarchitecture/MainApplicationReactNativeHost.java +0 -116
- package/example/android/app/src/main/java/com/freeraspreactnativeexample/newarchitecture/components/MainComponentsRegistry.java +0 -36
- package/example/android/app/src/main/java/com/freeraspreactnativeexample/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +0 -48
- package/example/android/app/src/main/jni/CMakeLists.txt +0 -7
- package/example/android/app/src/main/jni/MainApplicationModuleProvider.cpp +0 -32
- package/example/android/app/src/main/jni/MainApplicationModuleProvider.h +0 -16
- package/example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +0 -45
- package/example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +0 -38
- package/example/android/app/src/main/jni/MainComponentsRegistry.cpp +0 -65
- package/example/android/app/src/main/jni/MainComponentsRegistry.h +0 -32
- package/example/android/app/src/main/jni/OnLoad.cpp +0 -11
- package/example/ios/File.swift +0 -6
- package/example/ios/FreeraspReactNativeExample/AppDelegate.h +0 -8
- package/example/ios/FreeraspReactNativeExample/AppDelegate.mm +0 -133
- package/example/ios/FreeraspReactNativeExample/main.m +0 -10
- package/example/ios/FreeraspReactNativeExample-Bridging-Header.h +0 -3
- package/example/ios/FreeraspReactNativeExample.xcodeproj/project.pbxproj +0 -729
- package/example/ios/FreeraspReactNativeExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/example/ios/FreeraspReactNativeExampleTests/FreeraspReactNativeExampleTests.m +0 -66
- package/example/ios/FreeraspReactNativeExampleTests/Info.plist +0 -24
- /package/example/ios/{FreeraspReactNativeExample → FreeraspRNExample}/Images.xcassets/AppIcon.appiconset/Contents.json +0 -0
- /package/example/ios/{FreeraspReactNativeExample → FreeraspRNExample}/Images.xcassets/Contents.json +0 -0
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
#include "MainComponentsRegistry.h"
|
|
2
|
-
|
|
3
|
-
#include <CoreComponentsRegistry.h>
|
|
4
|
-
#include <fbjni/fbjni.h>
|
|
5
|
-
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
|
6
|
-
#include <react/renderer/components/rncore/ComponentDescriptors.h>
|
|
7
|
-
#include <rncli.h>
|
|
8
|
-
|
|
9
|
-
namespace facebook {
|
|
10
|
-
namespace react {
|
|
11
|
-
|
|
12
|
-
MainComponentsRegistry::MainComponentsRegistry(ComponentFactory *delegate) {}
|
|
13
|
-
|
|
14
|
-
std::shared_ptr<ComponentDescriptorProviderRegistry const>
|
|
15
|
-
MainComponentsRegistry::sharedProviderRegistry() {
|
|
16
|
-
auto providerRegistry = CoreComponentsRegistry::sharedProviderRegistry();
|
|
17
|
-
|
|
18
|
-
// Autolinked providers registered by RN CLI
|
|
19
|
-
rncli_registerProviders(providerRegistry);
|
|
20
|
-
|
|
21
|
-
// Custom Fabric Components go here. You can register custom
|
|
22
|
-
// components coming from your App or from 3rd party libraries here.
|
|
23
|
-
//
|
|
24
|
-
// providerRegistry->add(concreteComponentDescriptorProvider<
|
|
25
|
-
// AocViewerComponentDescriptor>());
|
|
26
|
-
return providerRegistry;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
jni::local_ref<MainComponentsRegistry::jhybriddata>
|
|
30
|
-
MainComponentsRegistry::initHybrid(
|
|
31
|
-
jni::alias_ref<jclass>,
|
|
32
|
-
ComponentFactory *delegate) {
|
|
33
|
-
auto instance = makeCxxInstance(delegate);
|
|
34
|
-
|
|
35
|
-
auto buildRegistryFunction =
|
|
36
|
-
[](EventDispatcher::Weak const &eventDispatcher,
|
|
37
|
-
ContextContainer::Shared const &contextContainer)
|
|
38
|
-
-> ComponentDescriptorRegistry::Shared {
|
|
39
|
-
auto registry = MainComponentsRegistry::sharedProviderRegistry()
|
|
40
|
-
->createComponentDescriptorRegistry(
|
|
41
|
-
{eventDispatcher, contextContainer});
|
|
42
|
-
|
|
43
|
-
auto mutableRegistry =
|
|
44
|
-
std::const_pointer_cast<ComponentDescriptorRegistry>(registry);
|
|
45
|
-
|
|
46
|
-
mutableRegistry->setFallbackComponentDescriptor(
|
|
47
|
-
std::make_shared<UnimplementedNativeViewComponentDescriptor>(
|
|
48
|
-
ComponentDescriptorParameters{
|
|
49
|
-
eventDispatcher, contextContainer, nullptr}));
|
|
50
|
-
|
|
51
|
-
return registry;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
delegate->buildRegistryFunction = buildRegistryFunction;
|
|
55
|
-
return instance;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
void MainComponentsRegistry::registerNatives() {
|
|
59
|
-
registerHybrid({
|
|
60
|
-
makeNativeMethod("initHybrid", MainComponentsRegistry::initHybrid),
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
} // namespace react
|
|
65
|
-
} // namespace facebook
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
#pragma once
|
|
2
|
-
|
|
3
|
-
#include <ComponentFactory.h>
|
|
4
|
-
#include <fbjni/fbjni.h>
|
|
5
|
-
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
|
6
|
-
#include <react/renderer/componentregistry/ComponentDescriptorRegistry.h>
|
|
7
|
-
|
|
8
|
-
namespace facebook {
|
|
9
|
-
namespace react {
|
|
10
|
-
|
|
11
|
-
class MainComponentsRegistry
|
|
12
|
-
: public facebook::jni::HybridClass<MainComponentsRegistry> {
|
|
13
|
-
public:
|
|
14
|
-
// Adapt it to the package you used for your Java class.
|
|
15
|
-
constexpr static auto kJavaDescriptor =
|
|
16
|
-
"Lcom/freeraspreactnativeexample/newarchitecture/components/MainComponentsRegistry;";
|
|
17
|
-
|
|
18
|
-
static void registerNatives();
|
|
19
|
-
|
|
20
|
-
MainComponentsRegistry(ComponentFactory *delegate);
|
|
21
|
-
|
|
22
|
-
private:
|
|
23
|
-
static std::shared_ptr<ComponentDescriptorProviderRegistry const>
|
|
24
|
-
sharedProviderRegistry();
|
|
25
|
-
|
|
26
|
-
static jni::local_ref<jhybriddata> initHybrid(
|
|
27
|
-
jni::alias_ref<jclass>,
|
|
28
|
-
ComponentFactory *delegate);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
} // namespace react
|
|
32
|
-
} // namespace facebook
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#include <fbjni/fbjni.h>
|
|
2
|
-
#include "MainApplicationTurboModuleManagerDelegate.h"
|
|
3
|
-
#include "MainComponentsRegistry.h"
|
|
4
|
-
|
|
5
|
-
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) {
|
|
6
|
-
return facebook::jni::initialize(vm, [] {
|
|
7
|
-
facebook::react::MainApplicationTurboModuleManagerDelegate::
|
|
8
|
-
registerNatives();
|
|
9
|
-
facebook::react::MainComponentsRegistry::registerNatives();
|
|
10
|
-
});
|
|
11
|
-
}
|
package/example/ios/File.swift
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
#import "AppDelegate.h"
|
|
2
|
-
|
|
3
|
-
#import <React/RCTBridge.h>
|
|
4
|
-
#import <React/RCTBundleURLProvider.h>
|
|
5
|
-
#import <React/RCTRootView.h>
|
|
6
|
-
|
|
7
|
-
#import <React/RCTAppSetupUtils.h>
|
|
8
|
-
|
|
9
|
-
#if RCT_NEW_ARCH_ENABLED
|
|
10
|
-
#import <React/CoreModulesPlugins.h>
|
|
11
|
-
#import <React/RCTCxxBridgeDelegate.h>
|
|
12
|
-
#import <React/RCTFabricSurfaceHostingProxyRootView.h>
|
|
13
|
-
#import <React/RCTSurfacePresenter.h>
|
|
14
|
-
#import <React/RCTSurfacePresenterBridgeAdapter.h>
|
|
15
|
-
#import <ReactCommon/RCTTurboModuleManager.h>
|
|
16
|
-
|
|
17
|
-
#import <react/config/ReactNativeConfig.h>
|
|
18
|
-
|
|
19
|
-
static NSString *const kRNConcurrentRoot = @"concurrentRoot";
|
|
20
|
-
|
|
21
|
-
@interface AppDelegate () <RCTCxxBridgeDelegate, RCTTurboModuleManagerDelegate> {
|
|
22
|
-
RCTTurboModuleManager *_turboModuleManager;
|
|
23
|
-
RCTSurfacePresenterBridgeAdapter *_bridgeAdapter;
|
|
24
|
-
std::shared_ptr<const facebook::react::ReactNativeConfig> _reactNativeConfig;
|
|
25
|
-
facebook::react::ContextContainer::Shared _contextContainer;
|
|
26
|
-
}
|
|
27
|
-
@end
|
|
28
|
-
#endif
|
|
29
|
-
|
|
30
|
-
@implementation AppDelegate
|
|
31
|
-
|
|
32
|
-
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
|
33
|
-
{
|
|
34
|
-
RCTAppSetupPrepareApp(application);
|
|
35
|
-
|
|
36
|
-
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
|
|
37
|
-
|
|
38
|
-
#if RCT_NEW_ARCH_ENABLED
|
|
39
|
-
_contextContainer = std::make_shared<facebook::react::ContextContainer const>();
|
|
40
|
-
_reactNativeConfig = std::make_shared<facebook::react::EmptyReactNativeConfig const>();
|
|
41
|
-
_contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
|
|
42
|
-
_bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer];
|
|
43
|
-
bridge.surfacePresenter = _bridgeAdapter.surfacePresenter;
|
|
44
|
-
#endif
|
|
45
|
-
|
|
46
|
-
NSDictionary *initProps = [self prepareInitialProps];
|
|
47
|
-
UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"FreeraspReactNativeExample", initProps);
|
|
48
|
-
|
|
49
|
-
if (@available(iOS 13.0, *)) {
|
|
50
|
-
rootView.backgroundColor = [UIColor systemBackgroundColor];
|
|
51
|
-
} else {
|
|
52
|
-
rootView.backgroundColor = [UIColor whiteColor];
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
|
56
|
-
UIViewController *rootViewController = [UIViewController new];
|
|
57
|
-
rootViewController.view = rootView;
|
|
58
|
-
self.window.rootViewController = rootViewController;
|
|
59
|
-
[self.window makeKeyAndVisible];
|
|
60
|
-
return YES;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
|
|
64
|
-
///
|
|
65
|
-
/// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
|
|
66
|
-
/// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
|
|
67
|
-
/// @return: `true` if the `concurrentRoot` feture is enabled. Otherwise, it returns `false`.
|
|
68
|
-
- (BOOL)concurrentRootEnabled
|
|
69
|
-
{
|
|
70
|
-
// Switch this bool to turn on and off the concurrent root
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
- (NSDictionary *)prepareInitialProps
|
|
75
|
-
{
|
|
76
|
-
NSMutableDictionary *initProps = [NSMutableDictionary new];
|
|
77
|
-
|
|
78
|
-
#ifdef RCT_NEW_ARCH_ENABLED
|
|
79
|
-
initProps[kRNConcurrentRoot] = @([self concurrentRootEnabled]);
|
|
80
|
-
#endif
|
|
81
|
-
|
|
82
|
-
return initProps;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
|
|
86
|
-
{
|
|
87
|
-
#if DEBUG
|
|
88
|
-
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
|
|
89
|
-
#else
|
|
90
|
-
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
|
|
91
|
-
#endif
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
#if RCT_NEW_ARCH_ENABLED
|
|
95
|
-
|
|
96
|
-
#pragma mark - RCTCxxBridgeDelegate
|
|
97
|
-
|
|
98
|
-
- (std::unique_ptr<facebook::react::JSExecutorFactory>)jsExecutorFactoryForBridge:(RCTBridge *)bridge
|
|
99
|
-
{
|
|
100
|
-
_turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge
|
|
101
|
-
delegate:self
|
|
102
|
-
jsInvoker:bridge.jsCallInvoker];
|
|
103
|
-
return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
#pragma mark RCTTurboModuleManagerDelegate
|
|
107
|
-
|
|
108
|
-
- (Class)getModuleClassFromName:(const char *)name
|
|
109
|
-
{
|
|
110
|
-
return RCTCoreModulesClassProvider(name);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
|
|
114
|
-
jsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
|
|
115
|
-
{
|
|
116
|
-
return nullptr;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
|
|
120
|
-
initParams:
|
|
121
|
-
(const facebook::react::ObjCTurboModule::InitParams &)params
|
|
122
|
-
{
|
|
123
|
-
return nullptr;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
- (id<RCTTurboModule>)getModuleInstanceFromClass:(Class)moduleClass
|
|
127
|
-
{
|
|
128
|
-
return RCTAppSetupDefaultModuleFromClass(moduleClass);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
#endif
|
|
132
|
-
|
|
133
|
-
@end
|