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 @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -31,6 +32,8 @@ std::make_shared(jsCallInvoker); std::shared_ptr utilsNativeModule = std::make_shared(jsCallInvoker); + std::shared_ptr validationNativeModule = + std::make_shared(jsCallInvoker); if (rt != nullptr) { rt->global().setProperty( @@ -41,6 +44,10 @@ *rt, jsi::PropNameID::forAscii(*rt, "CommUtilsModule"), jsi::Object::createFromHostObject(*rt, utilsNativeModule)); + rt->global().setProperty( + *rt, + jsi::PropNameID::forAscii(*rt, "CommValidationModule"), + jsi::Object::createFromHostObject(*rt, validationNativeModule)); } jni::local_ref 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 @@ -40,6 +40,7 @@ #import "CommCoreModule.h" #import "CommUtilsModule.h" +#import "CommValidationModule.h" #import "GlobalDBSingleton.h" #import "Logger.h" #import "MessageOperationsUtilities.h" @@ -278,6 +279,8 @@ std::make_shared(bridge.jsCallInvoker); std::shared_ptr utilsNativeModule = std::make_shared(bridge.jsCallInvoker); + std::shared_ptr validationNativeModule = + std::make_shared(bridge.jsCallInvoker); rt.global().setProperty( rt, @@ -287,6 +290,11 @@ rt, facebook::jsi::PropNameID::forAscii(rt, "CommUtilsModule"), facebook::jsi::Object::createFromHostObject(rt, utilsNativeModule)); + rt.global().setProperty( + rt, + facebook::jsi::PropNameID::forAscii(rt, "CommValidationModule"), + facebook::jsi::Object::createFromHostObject( + rt, validationNativeModule)); } }; 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 @@ -2,6 +2,9 @@ import type { Spec as CoreModuleSpec } from './schema/CommCoreModuleSchema.js'; import type { UtilsModuleSpec } from './schema/CommUtilsModuleSchema.js'; +import type { Spec as ValidationModuleSpec } from './schema/CommValidationModuleSchema.js'; export const commCoreModule: CoreModuleSpec = global.CommCoreModule; export const commUtilsModule: UtilsModuleSpec = global.CommUtilsModule; +export const commValidationModule: ValidationModuleSpec = + global.CommValidationModule;