Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3401401
D7452.id25165.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D7452.id25165.diff
View Options
diff --git a/native/android/app/src/cpp/jsiInstaller.cpp b/native/android/app/src/cpp/jsiInstaller.cpp
--- a/native/android/app/src/cpp/jsiInstaller.cpp
+++ b/native/android/app/src/cpp/jsiInstaller.cpp
@@ -7,6 +7,7 @@
#include <InternalModules/DatabaseInitializerJNIHelper.h>
#include <InternalModules/GlobalDBSingletonJNIHelper.h>
#include <NativeModules/CommCoreModule.h>
+#include <NativeModules/CommUtilsModule.h>
#include <PersistentStorageUtilities/MessageOperationsUtilities/MessageOperationsUtilitiesJNIHelper.h>
#include <PersistentStorageUtilities/ThreadOperationsUtilities/ThreadOperationsJNIHelper.h>
@@ -25,14 +26,20 @@
comm::HashMap additionalParameters) {
jsi::Runtime *rt = (jsi::Runtime *)jsContext;
auto jsCallInvoker = jsCallInvokerHolder->cthis()->getCallInvoker();
- std::shared_ptr<comm::CommCoreModule> nativeModule =
+ std::shared_ptr<comm::CommCoreModule> coreNativeModule =
std::make_shared<comm::CommCoreModule>(jsCallInvoker);
+ std::shared_ptr<comm::CommUtilsModule> utilsNativeModule =
+ std::make_shared<comm::CommUtilsModule>(jsCallInvoker);
if (rt != nullptr) {
rt->global().setProperty(
*rt,
jsi::PropNameID::forAscii(*rt, "CommCoreModule"),
- jsi::Object::createFromHostObject(*rt, nativeModule));
+ jsi::Object::createFromHostObject(*rt, coreNativeModule));
+ rt->global().setProperty(
+ *rt,
+ jsi::PropNameID::forAscii(*rt, "CommUtilsModule"),
+ jsi::Object::createFromHostObject(*rt, utilsNativeModule));
}
jni::local_ref<jni::JObject> sqliteFilePathObj =
diff --git a/native/ios/Comm/AppDelegate.mm b/native/ios/Comm/AppDelegate.mm
--- a/native/ios/Comm/AppDelegate.mm
+++ b/native/ios/Comm/AppDelegate.mm
@@ -39,6 +39,7 @@
#import <reacthermes/HermesExecutorFactory.h>
#import "CommCoreModule.h"
+#import "CommUtilsModule.h"
#import "GlobalDBSingleton.h"
#import "Logger.h"
#import "MessageOperationsUtilities.h"
@@ -257,13 +258,19 @@
}
__typeof(self) strongSelf = weakSelf;
if (strongSelf) {
- std::shared_ptr<comm::CommCoreModule> nativeModule =
+ std::shared_ptr<comm::CommCoreModule> coreNativeModule =
std::make_shared<comm::CommCoreModule>(bridge.jsCallInvoker);
+ std::shared_ptr<comm::CommUtilsModule> utilsNativeModule =
+ std::make_shared<comm::CommUtilsModule>(bridge.jsCallInvoker);
rt.global().setProperty(
rt,
facebook::jsi::PropNameID::forAscii(rt, "CommCoreModule"),
- facebook::jsi::Object::createFromHostObject(rt, nativeModule));
+ facebook::jsi::Object::createFromHostObject(rt, coreNativeModule));
+ rt.global().setProperty(
+ rt,
+ facebook::jsi::PropNameID::forAscii(rt, "CommUtilsModule"),
+ facebook::jsi::Object::createFromHostObject(rt, utilsNativeModule));
}
};
const auto installer =
diff --git a/native/native-modules.js b/native/native-modules.js
--- a/native/native-modules.js
+++ b/native/native-modules.js
@@ -1,5 +1,7 @@
// @flow
-import type { Spec } from './schema/CommCoreModuleSchema.js';
+import type { Spec as CoreModuleSpec } from './schema/CommCoreModuleSchema.js';
+import type { UtilsModuleSpec } from './schema/CommUtilsModuleSchema.js';
-export const commCoreModule: Spec = global.CommCoreModule;
+export const commCoreModule: CoreModuleSpec = global.CommCoreModule;
+export const commUtilsModule: UtilsModuleSpec = global.CommUtilsModule;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 3, 11:57 AM (20 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2611181
Default Alt Text
D7452.id25165.diff (3 KB)
Attached To
Mode
D7452: [native] Install CommUtils JSI module
Attached
Detach File
Event Timeline
Log In to Comment