@veryai/react-native-sdk 1.0.28 → 1.0.30
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/README.md +0 -1
- package/android/build.gradle +27 -1
- package/android/src/main/kotlin/com/verysdk/rn/{VerySDKModule.kt → VerySDKModuleImpl.kt} +12 -11
- package/android/src/main/kotlin/com/verysdk/rn/VerySDKPackage.kt +18 -8
- package/android/src/newarch/kotlin/com/verysdk/rn/VerySDKModule.kt +21 -0
- package/android/src/oldarch/kotlin/com/verysdk/rn/VerySDKModule.kt +25 -0
- package/ios/VerySDKRN.mm +31 -0
- package/ios/VerySDKRN.swift +7 -6
- package/lib/commonjs/NativeVerySDK.js +1 -10
- package/lib/commonjs/NativeVerySDK.js.map +1 -1
- package/lib/commonjs/index.js +0 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/package.json +1 -0
- package/lib/module/NativeVerySDK.js +4 -11
- package/lib/module/NativeVerySDK.js.map +1 -1
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/types.js +1 -1
- package/lib/typescript/NativeVerySDK.d.ts +4 -3
- package/lib/typescript/NativeVerySDK.d.ts.map +1 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +0 -1
- package/lib/typescript/types.d.ts.map +1 -1
- package/package.json +12 -4
- package/src/NativeVerySDK.ts +5 -21
- package/src/index.tsx +2 -3
- package/src/types.ts +0 -1
- package/veryai-react-native-sdk.podspec +8 -3
- package/ios/VerySDKRN.m +0 -12
package/README.md
CHANGED
|
@@ -125,7 +125,6 @@ Decode the `id_token` JWT to get the user's identity:
|
|
|
125
125
|
| `userId` | String? | undefined | Undefined for enrollment, user ID for verification |
|
|
126
126
|
| `language` | String? | device | Locale code (e.g. `"en"`, `"es"`, `"ja"`). 35 languages supported. |
|
|
127
127
|
| `themeMode` | String | `"dark"` | `"dark"` or `"light"` |
|
|
128
|
-
| `baseUrl` | String? | production | Override API endpoint (for staging/testing) |
|
|
129
128
|
| `presentationStyle` | String | `"fullScreen"` | `"fullScreen"` or `"bottomSheet"` |
|
|
130
129
|
|
|
131
130
|
### VeryResult
|
package/android/build.gradle
CHANGED
|
@@ -9,9 +9,17 @@ buildscript {
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
def isNewArchitectureEnabled() {
|
|
13
|
+
return rootProject.hasProperty("newArchEnabled") && rootProject.newArchEnabled == "true"
|
|
14
|
+
}
|
|
15
|
+
|
|
12
16
|
apply plugin: 'com.android.library'
|
|
13
17
|
apply plugin: 'kotlin-android'
|
|
14
18
|
|
|
19
|
+
if (isNewArchitectureEnabled()) {
|
|
20
|
+
apply plugin: 'com.facebook.react'
|
|
21
|
+
}
|
|
22
|
+
|
|
15
23
|
android {
|
|
16
24
|
if (project.android.hasProperty("namespace")) {
|
|
17
25
|
namespace 'com.verysdk.rn'
|
|
@@ -22,6 +30,11 @@ android {
|
|
|
22
30
|
defaultConfig {
|
|
23
31
|
minSdkVersion 23
|
|
24
32
|
targetSdkVersion 34
|
|
33
|
+
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
buildFeatures {
|
|
37
|
+
buildConfig = true
|
|
25
38
|
}
|
|
26
39
|
|
|
27
40
|
compileOptions {
|
|
@@ -36,6 +49,11 @@ android {
|
|
|
36
49
|
sourceSets {
|
|
37
50
|
main {
|
|
38
51
|
java.srcDirs += 'src/main/kotlin'
|
|
52
|
+
if (isNewArchitectureEnabled()) {
|
|
53
|
+
java.srcDirs += ['src/newarch/kotlin']
|
|
54
|
+
} else {
|
|
55
|
+
java.srcDirs += ['src/oldarch/kotlin']
|
|
56
|
+
}
|
|
39
57
|
}
|
|
40
58
|
}
|
|
41
59
|
}
|
|
@@ -54,6 +72,14 @@ dependencies {
|
|
|
54
72
|
if (findProject(':very-sdk') != null) {
|
|
55
73
|
implementation project(':very-sdk')
|
|
56
74
|
} else {
|
|
57
|
-
implementation "org.very:sdk:${project.findProperty('verySDKVersion') ?: '1.0.
|
|
75
|
+
implementation "org.very:sdk:${project.findProperty('verySDKVersion') ?: '1.0.30'}"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (isNewArchitectureEnabled()) {
|
|
80
|
+
react {
|
|
81
|
+
jsRootDir = file("../src/")
|
|
82
|
+
libraryName = "RNVerySDKSpec"
|
|
83
|
+
codegenJavaPackageName = "com.verysdk.rn"
|
|
58
84
|
}
|
|
59
85
|
}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
package com.verysdk.rn
|
|
2
2
|
|
|
3
|
-
import com.facebook.react.bridge
|
|
3
|
+
import com.facebook.react.bridge.Arguments
|
|
4
|
+
import com.facebook.react.bridge.Promise
|
|
5
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
6
|
+
import com.facebook.react.bridge.ReadableMap
|
|
4
7
|
import org.very.sdk.VeryConfig
|
|
5
8
|
import org.very.sdk.VerySDK
|
|
6
9
|
import org.very.sdk.VeryPresentationStyle
|
|
7
10
|
|
|
8
|
-
class
|
|
9
|
-
ReactContextBaseJavaModule(reactContext) {
|
|
11
|
+
class VerySDKModuleImpl(private val reactContext: ReactApplicationContext) {
|
|
10
12
|
|
|
11
|
-
override fun getName(): String = "VerySDKRN"
|
|
12
|
-
|
|
13
|
-
@ReactMethod
|
|
14
13
|
fun authenticate(configMap: ReadableMap, promise: Promise) {
|
|
15
|
-
val activity = currentActivity
|
|
14
|
+
val activity = reactContext.currentActivity
|
|
16
15
|
if (activity == null) {
|
|
17
16
|
promise.reject("NO_ACTIVITY", "No current activity")
|
|
18
17
|
return
|
|
@@ -22,8 +21,7 @@ class VerySDKModule(reactContext: ReactApplicationContext) :
|
|
|
22
21
|
sdkKey = configMap.getString("sdkKey") ?: "",
|
|
23
22
|
userId = if (configMap.hasKey("userId") && !configMap.isNull("userId")) configMap.getString("userId") else null,
|
|
24
23
|
language = if (configMap.hasKey("language") && !configMap.isNull("language")) configMap.getString("language") else null,
|
|
25
|
-
themeMode = configMap.getString("themeMode") ?: "dark"
|
|
26
|
-
baseUrl = if (configMap.hasKey("baseUrl") && !configMap.isNull("baseUrl")) configMap.getString("baseUrl") else null
|
|
24
|
+
themeMode = configMap.getString("themeMode") ?: "dark"
|
|
27
25
|
)
|
|
28
26
|
|
|
29
27
|
val style = when (configMap.getString("presentationStyle")) {
|
|
@@ -44,9 +42,12 @@ class VerySDKModule(reactContext: ReactApplicationContext) :
|
|
|
44
42
|
}
|
|
45
43
|
}
|
|
46
44
|
|
|
47
|
-
@ReactMethod
|
|
48
45
|
fun isSupported(promise: Promise) {
|
|
49
|
-
val context = currentActivity ?:
|
|
46
|
+
val context = reactContext.currentActivity ?: reactContext
|
|
50
47
|
promise.resolve(VerySDK.isSupport(context))
|
|
51
48
|
}
|
|
49
|
+
|
|
50
|
+
companion object {
|
|
51
|
+
const val NAME = "VerySDKRN"
|
|
52
|
+
}
|
|
52
53
|
}
|
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
package com.verysdk.rn
|
|
2
2
|
|
|
3
|
-
import com.facebook.react.
|
|
3
|
+
import com.facebook.react.TurboReactPackage
|
|
4
4
|
import com.facebook.react.bridge.NativeModule
|
|
5
5
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
6
|
-
import com.facebook.react.
|
|
6
|
+
import com.facebook.react.module.model.ReactModuleInfo
|
|
7
|
+
import com.facebook.react.module.model.ReactModuleInfoProvider
|
|
7
8
|
|
|
8
|
-
class VerySDKPackage :
|
|
9
|
-
override fun
|
|
10
|
-
|
|
11
|
-
}
|
|
9
|
+
class VerySDKPackage : TurboReactPackage() {
|
|
10
|
+
override fun getModule(name: String, reactContext: ReactApplicationContext): NativeModule? =
|
|
11
|
+
if (name == VerySDKModuleImpl.NAME) VerySDKModule(reactContext) else null
|
|
12
12
|
|
|
13
|
-
override fun
|
|
14
|
-
|
|
13
|
+
override fun getReactModuleInfoProvider() = ReactModuleInfoProvider {
|
|
14
|
+
mapOf(
|
|
15
|
+
VerySDKModuleImpl.NAME to ReactModuleInfo(
|
|
16
|
+
VerySDKModuleImpl.NAME,
|
|
17
|
+
VerySDKModule::class.java.name,
|
|
18
|
+
false, // canOverrideExistingModule
|
|
19
|
+
false, // needsEagerInit
|
|
20
|
+
false, // hasConstants
|
|
21
|
+
false, // isCxxModule
|
|
22
|
+
BuildConfig.IS_NEW_ARCHITECTURE_ENABLED // isTurboModule
|
|
23
|
+
)
|
|
24
|
+
)
|
|
15
25
|
}
|
|
16
26
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
package com.verysdk.rn
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.bridge.Promise
|
|
4
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
5
|
+
import com.facebook.react.bridge.ReadableMap
|
|
6
|
+
|
|
7
|
+
class VerySDKModule(reactContext: ReactApplicationContext) :
|
|
8
|
+
NativeVerySDKSpec(reactContext) {
|
|
9
|
+
|
|
10
|
+
private val impl = VerySDKModuleImpl(reactContext)
|
|
11
|
+
|
|
12
|
+
override fun getName(): String = VerySDKModuleImpl.NAME
|
|
13
|
+
|
|
14
|
+
override fun authenticate(config: ReadableMap, promise: Promise) {
|
|
15
|
+
impl.authenticate(config, promise)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
override fun isSupported(promise: Promise) {
|
|
19
|
+
impl.isSupported(promise)
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
package com.verysdk.rn
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.bridge.Promise
|
|
4
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
5
|
+
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
6
|
+
import com.facebook.react.bridge.ReactMethod
|
|
7
|
+
import com.facebook.react.bridge.ReadableMap
|
|
8
|
+
|
|
9
|
+
class VerySDKModule(reactContext: ReactApplicationContext) :
|
|
10
|
+
ReactContextBaseJavaModule(reactContext) {
|
|
11
|
+
|
|
12
|
+
private val impl = VerySDKModuleImpl(reactContext)
|
|
13
|
+
|
|
14
|
+
override fun getName(): String = VerySDKModuleImpl.NAME
|
|
15
|
+
|
|
16
|
+
@ReactMethod
|
|
17
|
+
fun authenticate(config: ReadableMap, promise: Promise) {
|
|
18
|
+
impl.authenticate(config, promise)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@ReactMethod
|
|
22
|
+
fun isSupported(promise: Promise) {
|
|
23
|
+
impl.isSupported(promise)
|
|
24
|
+
}
|
|
25
|
+
}
|
package/ios/VerySDKRN.mm
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#import <React/RCTBridgeModule.h>
|
|
2
|
+
|
|
3
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
4
|
+
#import <RNVerySDKSpec/RNVerySDKSpec.h>
|
|
5
|
+
#endif
|
|
6
|
+
|
|
7
|
+
@interface RCT_EXTERN_MODULE(VerySDKRN, NSObject)
|
|
8
|
+
|
|
9
|
+
RCT_EXTERN_METHOD(authenticate:(NSDictionary *)config
|
|
10
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
11
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
12
|
+
|
|
13
|
+
RCT_EXTERN_METHOD(isSupported:(RCTPromiseResolveBlock)resolve
|
|
14
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
15
|
+
|
|
16
|
+
@end
|
|
17
|
+
|
|
18
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
19
|
+
@interface VerySDKRN (TurboModule) <NativeVerySDKSpec>
|
|
20
|
+
@end
|
|
21
|
+
|
|
22
|
+
@implementation VerySDKRN (TurboModule)
|
|
23
|
+
|
|
24
|
+
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
|
25
|
+
(const facebook::react::ObjCTurboModule::InitParams &)params
|
|
26
|
+
{
|
|
27
|
+
return std::make_shared<facebook::react::NativeVerySDKSpecJSI>(params);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@end
|
|
31
|
+
#endif
|
package/ios/VerySDKRN.swift
CHANGED
|
@@ -6,9 +6,10 @@ class VerySDKRN: NSObject {
|
|
|
6
6
|
|
|
7
7
|
@objc static func requiresMainQueueSetup() -> Bool { return false }
|
|
8
8
|
|
|
9
|
-
@objc
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
@objc(authenticate:resolve:reject:)
|
|
10
|
+
func authenticate(_ config: NSDictionary,
|
|
11
|
+
resolve: @escaping RCTPromiseResolveBlock,
|
|
12
|
+
reject: @escaping RCTPromiseRejectBlock) {
|
|
12
13
|
DispatchQueue.main.async {
|
|
13
14
|
guard let rootVC = Self.topViewController() else {
|
|
14
15
|
reject("NO_VC", "No root view controller found", nil)
|
|
@@ -27,7 +28,6 @@ class VerySDKRN: NSObject {
|
|
|
27
28
|
userId: config["userId"] as? String,
|
|
28
29
|
language: config["language"] as? String,
|
|
29
30
|
themeMode: config["themeMode"] as? String ?? "dark",
|
|
30
|
-
baseUrl: config["baseUrl"] as? String,
|
|
31
31
|
livenessMode: livenessMode
|
|
32
32
|
)
|
|
33
33
|
|
|
@@ -53,8 +53,9 @@ class VerySDKRN: NSObject {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
@objc
|
|
57
|
-
|
|
56
|
+
@objc(isSupported:reject:)
|
|
57
|
+
func isSupported(_ resolve: RCTPromiseResolveBlock,
|
|
58
|
+
reject: RCTPromiseRejectBlock) {
|
|
58
59
|
resolve(VerySDK.isSupport())
|
|
59
60
|
}
|
|
60
61
|
|
|
@@ -5,14 +5,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
|
-
|
|
9
|
-
ios: "- You have run 'pod install'\n",
|
|
10
|
-
default: ''
|
|
11
|
-
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
|
|
12
|
-
const VerySDKRN = _reactNative.NativeModules.VerySDKRN ? _reactNative.NativeModules.VerySDKRN : new Proxy({}, {
|
|
13
|
-
get() {
|
|
14
|
-
throw new Error(LINKING_ERROR);
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
var _default = exports.default = VerySDKRN;
|
|
8
|
+
var _default = exports.default = _reactNative.TurboModuleRegistry.getEnforcing('VerySDKRN');
|
|
18
9
|
//# sourceMappingURL=NativeVerySDK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeVerySDK.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAOpCC,gCAAmB,CAACC,YAAY,CAAO,WAAW,CAAC","ignoreList":[]}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -13,7 +13,6 @@ const VerySDK = exports.VerySDK = {
|
|
|
13
13
|
userId: config.userId ?? null,
|
|
14
14
|
language: config.language ?? null,
|
|
15
15
|
themeMode: config.themeMode ?? 'dark',
|
|
16
|
-
baseUrl: config.baseUrl ?? null,
|
|
17
16
|
presentationStyle: config.presentationStyle ?? 'fullScreen'
|
|
18
17
|
});
|
|
19
18
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_NativeVerySDK","_interopRequireDefault","require","e","__esModule","default","VerySDK","exports","authenticate","config","raw","NativeModule","sdkKey","userId","language","themeMode","
|
|
1
|
+
{"version":3,"names":["_NativeVerySDK","_interopRequireDefault","require","e","__esModule","default","VerySDK","exports","authenticate","config","raw","NativeModule","sdkKey","userId","language","themeMode","presentationStyle","code","signedToken","undefined","error","errorMessage","isSuccess","isSupported"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA2C,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAKpC,MAAMG,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG;EACrB,MAAME,YAAYA,CAACC,MAAkB,EAAuB;IAC1D,MAAMC,GAAG,GAAI,MAAMC,sBAAY,CAACH,YAAY,CAAC;MAC3CI,MAAM,EAAEH,MAAM,CAACG,MAAM;MACrBC,MAAM,EAAEJ,MAAM,CAACI,MAAM,IAAI,IAAI;MAC7BC,QAAQ,EAAEL,MAAM,CAACK,QAAQ,IAAI,IAAI;MACjCC,SAAS,EAAEN,MAAM,CAACM,SAAS,IAAI,MAAM;MACrCC,iBAAiB,EAAEP,MAAM,CAACO,iBAAiB,IAAI;IACjD,CAAC,CAA6B;IAC9B,OAAO;MACLC,IAAI,EAAEP,GAAG,CAACO,IAAc;MACxBJ,MAAM,EAAEH,GAAG,CAACG,MAAgB;MAC5BK,WAAW,EAAGR,GAAG,CAACQ,WAAW,IAAeC,SAAS;MACrDC,KAAK,EAAGV,GAAG,CAACU,KAAK,IAAeD,SAAS;MACzCE,YAAY,EAAGX,GAAG,CAACW,YAAY,IAAeF,SAAS;MACvDG,SAAS,EAAEZ,GAAG,CAACY;IACjB,CAAC;EACH,CAAC;EAED,MAAMC,WAAWA,CAAA,EAAqB;IACpC,OAAOZ,sBAAY,CAACY,WAAW,CAAC,CAAC;EACnC;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"commonjs"}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
|
|
6
|
-
const VerySDKRN = NativeModules.VerySDKRN ? NativeModules.VerySDKRN : new Proxy({}, {
|
|
7
|
-
get() {
|
|
8
|
-
throw new Error(LINKING_ERROR);
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
export default VerySDKRN;
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { TurboModuleRegistry } from 'react-native';
|
|
4
|
+
export default TurboModuleRegistry.getEnforcing('VerySDKRN');
|
|
12
5
|
//# sourceMappingURL=NativeVerySDK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeVerySDK.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;AAOlD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,WAAW,CAAC","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
3
|
import NativeModule from './NativeVerySDK';
|
|
2
4
|
export const VerySDK = {
|
|
3
5
|
async authenticate(config) {
|
|
@@ -6,7 +8,6 @@ export const VerySDK = {
|
|
|
6
8
|
userId: config.userId ?? null,
|
|
7
9
|
language: config.language ?? null,
|
|
8
10
|
themeMode: config.themeMode ?? 'dark',
|
|
9
|
-
baseUrl: config.baseUrl ?? null,
|
|
10
11
|
presentationStyle: config.presentationStyle ?? 'fullScreen'
|
|
11
12
|
});
|
|
12
13
|
return {
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeModule","VerySDK","authenticate","config","raw","sdkKey","userId","language","themeMode","
|
|
1
|
+
{"version":3,"names":["NativeModule","VerySDK","authenticate","config","raw","sdkKey","userId","language","themeMode","presentationStyle","code","signedToken","undefined","error","errorMessage","isSuccess","isSupported"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,OAAOA,YAAY,MAAM,iBAAiB;AAK1C,OAAO,MAAMC,OAAO,GAAG;EACrB,MAAMC,YAAYA,CAACC,MAAkB,EAAuB;IAC1D,MAAMC,GAAG,GAAI,MAAMJ,YAAY,CAACE,YAAY,CAAC;MAC3CG,MAAM,EAAEF,MAAM,CAACE,MAAM;MACrBC,MAAM,EAAEH,MAAM,CAACG,MAAM,IAAI,IAAI;MAC7BC,QAAQ,EAAEJ,MAAM,CAACI,QAAQ,IAAI,IAAI;MACjCC,SAAS,EAAEL,MAAM,CAACK,SAAS,IAAI,MAAM;MACrCC,iBAAiB,EAAEN,MAAM,CAACM,iBAAiB,IAAI;IACjD,CAAC,CAA6B;IAC9B,OAAO;MACLC,IAAI,EAAEN,GAAG,CAACM,IAAc;MACxBJ,MAAM,EAAEF,GAAG,CAACE,MAAgB;MAC5BK,WAAW,EAAGP,GAAG,CAACO,WAAW,IAAeC,SAAS;MACrDC,KAAK,EAAGT,GAAG,CAACS,KAAK,IAAeD,SAAS;MACzCE,YAAY,EAAGV,GAAG,CAACU,YAAY,IAAeF,SAAS;MACvDG,SAAS,EAAEX,GAAG,CAACW;IACjB,CAAC;EACH,CAAC;EAED,MAAMC,WAAWA,CAAA,EAAqB;IACpC,OAAOhB,YAAY,CAACgB,WAAW,CAAC,CAAC;EACnC;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
package/lib/module/types.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
//# sourceMappingURL=types.js.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { TurboModule } from 'react-native';
|
|
2
|
+
export interface Spec extends TurboModule {
|
|
3
|
+
authenticate(config: Object): Promise<Object>;
|
|
3
4
|
isSupported(): Promise<boolean>;
|
|
4
5
|
}
|
|
5
|
-
declare const _default:
|
|
6
|
+
declare const _default: Spec;
|
|
6
7
|
export default _default;
|
|
7
8
|
//# sourceMappingURL=NativeVerySDK.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeVerySDK.d.ts","sourceRoot":"","sources":["../../src/NativeVerySDK.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NativeVerySDK.d.ts","sourceRoot":"","sources":["../../src/NativeVerySDK.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9C,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CACjC;;AAED,wBAAmE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEtD,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;AAEvC,eAAO,MAAM,OAAO;yBACS,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEtD,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;AAEvC,eAAO,MAAM,OAAO;yBACS,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;mBAkBtC,OAAO,CAAC,OAAO,CAAC;CAGtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7B,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7B,iBAAiB,CAAC,EAAE,YAAY,GAAG,aAAa,CAAC;CAClD;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;CACpB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veryai/react-native-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.30",
|
|
4
4
|
"description": "React Native wrapper for Very SDK - Palm biometrics verification",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"react-native": "*"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"react": "18.
|
|
41
|
-
"react-native": "0.
|
|
42
|
-
"react-native-builder-bob": "^0.
|
|
40
|
+
"react": "18.3.1",
|
|
41
|
+
"react-native": "0.76.5",
|
|
42
|
+
"react-native-builder-bob": "^0.30.0",
|
|
43
43
|
"typescript": "^5.0.0"
|
|
44
44
|
},
|
|
45
45
|
"react-native-builder-bob": {
|
|
@@ -55,5 +55,13 @@
|
|
|
55
55
|
}
|
|
56
56
|
]
|
|
57
57
|
]
|
|
58
|
+
},
|
|
59
|
+
"codegenConfig": {
|
|
60
|
+
"name": "RNVerySDKSpec",
|
|
61
|
+
"type": "modules",
|
|
62
|
+
"jsSrcsDir": "src",
|
|
63
|
+
"android": {
|
|
64
|
+
"javaPackageName": "com.verysdk.rn"
|
|
65
|
+
}
|
|
58
66
|
}
|
|
59
67
|
}
|
package/src/NativeVerySDK.ts
CHANGED
|
@@ -1,25 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { TurboModule } from 'react-native';
|
|
2
|
+
import { TurboModuleRegistry } from 'react-native';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
|
|
6
|
-
'- You rebuilt the app after installing the package\n' +
|
|
7
|
-
'- You are not using Expo Go\n';
|
|
8
|
-
|
|
9
|
-
const VerySDKRN = NativeModules.VerySDKRN
|
|
10
|
-
? NativeModules.VerySDKRN
|
|
11
|
-
: new Proxy(
|
|
12
|
-
{},
|
|
13
|
-
{
|
|
14
|
-
get() {
|
|
15
|
-
throw new Error(LINKING_ERROR);
|
|
16
|
-
},
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
export interface NativeVerySDKSpec {
|
|
21
|
-
authenticate(config: Record<string, any>): Promise<Record<string, any>>;
|
|
4
|
+
export interface Spec extends TurboModule {
|
|
5
|
+
authenticate(config: Object): Promise<Object>;
|
|
22
6
|
isSupported(): Promise<boolean>;
|
|
23
7
|
}
|
|
24
8
|
|
|
25
|
-
export default VerySDKRN
|
|
9
|
+
export default TurboModuleRegistry.getEnforcing<Spec>('VerySDKRN');
|
package/src/index.tsx
CHANGED
|
@@ -5,14 +5,13 @@ export type { VeryConfig, VeryResult };
|
|
|
5
5
|
|
|
6
6
|
export const VerySDK = {
|
|
7
7
|
async authenticate(config: VeryConfig): Promise<VeryResult> {
|
|
8
|
-
const raw = await NativeModule.authenticate({
|
|
8
|
+
const raw = (await NativeModule.authenticate({
|
|
9
9
|
sdkKey: config.sdkKey,
|
|
10
10
|
userId: config.userId ?? null,
|
|
11
11
|
language: config.language ?? null,
|
|
12
12
|
themeMode: config.themeMode ?? 'dark',
|
|
13
|
-
baseUrl: config.baseUrl ?? null,
|
|
14
13
|
presentationStyle: config.presentationStyle ?? 'fullScreen',
|
|
15
|
-
})
|
|
14
|
+
})) as Record<string, unknown>;
|
|
16
15
|
return {
|
|
17
16
|
code: raw.code as string,
|
|
18
17
|
userId: raw.userId as string,
|
package/src/types.ts
CHANGED
|
@@ -11,8 +11,13 @@ Pod::Spec.new do |s|
|
|
|
11
11
|
s.source = { :git => "https://github.com/veroslabs/very-sdk.git", :tag => s.version }
|
|
12
12
|
s.platform = :ios, "13.0"
|
|
13
13
|
|
|
14
|
-
s.source_files = "ios/**/*.{swift,h,m}"
|
|
15
|
-
s.dependency "
|
|
16
|
-
s.dependency "VerySDK", "1.0.28"
|
|
14
|
+
s.source_files = "ios/**/*.{swift,h,m,mm}"
|
|
15
|
+
s.dependency "VerySDK", "1.0.30"
|
|
17
16
|
s.swift_version = "5.0"
|
|
17
|
+
|
|
18
|
+
if respond_to?(:install_modules_dependencies, true)
|
|
19
|
+
install_modules_dependencies(s)
|
|
20
|
+
else
|
|
21
|
+
s.dependency "React-Core"
|
|
22
|
+
end
|
|
18
23
|
end
|
package/ios/VerySDKRN.m
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#import <React/RCTBridgeModule.h>
|
|
2
|
-
|
|
3
|
-
@interface RCT_EXTERN_MODULE(VerySDKRN, NSObject)
|
|
4
|
-
|
|
5
|
-
RCT_EXTERN_METHOD(authenticate:(NSDictionary *)config
|
|
6
|
-
resolver:(RCTPromiseResolveBlock)resolve
|
|
7
|
-
rejecter:(RCTPromiseRejectBlock)reject)
|
|
8
|
-
|
|
9
|
-
RCT_EXTERN_METHOD(isSupported:(RCTPromiseResolveBlock)resolve
|
|
10
|
-
rejecter:(RCTPromiseRejectBlock)reject)
|
|
11
|
-
|
|
12
|
-
@end
|