@identomat-inc/react-native-identomat 1.0.20

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.
Files changed (96) hide show
  1. package/README.md +44 -0
  2. package/android/build.gradle +48 -0
  3. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  4. package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
  5. package/android/src/main/AndroidManifest.xml +7 -0
  6. package/android/src/main/java/com/reactlibrary/BridgeModule.java +86 -0
  7. package/android/src/main/java/com/reactlibrary/BridgePackage.java +36 -0
  8. package/index.js +46 -0
  9. package/ios/Frameworks/identomat.framework/Assets.car +0 -0
  10. package/ios/Frameworks/identomat.framework/Headers/identomat-Swift.h +638 -0
  11. package/ios/Frameworks/identomat.framework/Headers/identomat.h +18 -0
  12. package/ios/Frameworks/identomat.framework/Info.plist +0 -0
  13. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/Project/arm.swiftsourceinfo +0 -0
  14. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  15. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/Project/arm64.swiftsourceinfo +0 -0
  16. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/Project/armv7-apple-ios.swiftsourceinfo +0 -0
  17. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/Project/armv7.swiftsourceinfo +0 -0
  18. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm.swiftdoc +0 -0
  19. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm.swiftinterface +1866 -0
  20. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm.swiftmodule +0 -0
  21. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  22. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm64-apple-ios.swiftinterface +1947 -0
  23. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
  24. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm64.swiftdoc +0 -0
  25. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm64.swiftinterface +1947 -0
  26. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/arm64.swiftmodule +0 -0
  27. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/armv7-apple-ios.swiftdoc +0 -0
  28. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/armv7-apple-ios.swiftinterface +1866 -0
  29. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/armv7-apple-ios.swiftmodule +0 -0
  30. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/armv7.swiftdoc +0 -0
  31. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/armv7.swiftinterface +1866 -0
  32. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/armv7.swiftmodule +0 -0
  33. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/x86_64.swiftdoc +0 -0
  34. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/x86_64.swiftinterface +1947 -0
  35. package/ios/Frameworks/identomat.framework/Modules/identomat.swiftmodule/x86_64.swiftmodule +0 -0
  36. package/ios/Frameworks/identomat.framework/Modules/module.modulemap +11 -0
  37. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/3Qb-Zw-Ydv-view-5fQ-xy-n01.nib/objects-11.0+.nib +0 -0
  38. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/3Qb-Zw-Ydv-view-5fQ-xy-n01.nib/runtime.nib +0 -0
  39. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/Ajy-Ix-fe9-view-G1g-ks-BqP.nib/objects-11.0+.nib +0 -0
  40. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/Ajy-Ix-fe9-view-G1g-ks-BqP.nib/runtime.nib +0 -0
  41. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/Info.plist +0 -0
  42. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/RiD-hj-AH5-view-oaZ-g7-pTv.nib/objects-11.0+.nib +0 -0
  43. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/RiD-hj-AH5-view-oaZ-g7-pTv.nib/runtime.nib +0 -0
  44. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/VAA-Ss-lbh-view-UDO-8x-V4i.nib/objects-11.0+.nib +0 -0
  45. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/VAA-Ss-lbh-view-UDO-8x-V4i.nib/runtime.nib +0 -0
  46. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/YyM-f0-UbG-view-INz-ta-t1c.nib/objects-11.0+.nib +0 -0
  47. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/YyM-f0-UbG-view-INz-ta-t1c.nib/runtime.nib +0 -0
  48. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/agreement_view.nib/objects-11.0+.nib +0 -0
  49. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/agreement_view.nib/runtime.nib +0 -0
  50. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/default_view_controller.nib/objects-11.0+.nib +0 -0
  51. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/default_view_controller.nib/runtime.nib +0 -0
  52. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/document_types_view.nib/objects-11.0+.nib +0 -0
  53. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/document_types_view.nib/runtime.nib +0 -0
  54. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/fQF-H1-pI2-view-oqs-SO-IYK.nib/objects-11.0+.nib +0 -0
  55. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/fQF-H1-pI2-view-oqs-SO-IYK.nib/runtime.nib +0 -0
  56. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/liveness_view.nib/objects-11.0+.nib +0 -0
  57. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/liveness_view.nib/runtime.nib +0 -0
  58. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/match_photo_view.nib/objects-11.0+.nib +0 -0
  59. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/match_photo_view.nib/runtime.nib +0 -0
  60. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/qkz-dS-cJe-view-KRp-Px-e4R.nib/objects-11.0+.nib +0 -0
  61. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/qkz-dS-cJe-view-KRp-Px-e4R.nib/runtime.nib +0 -0
  62. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/scan_document_view.nib/objects-11.0+.nib +0 -0
  63. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/scan_document_view.nib/runtime.nib +0 -0
  64. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/upload_file_view.nib/objects-11.0+.nib +0 -0
  65. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/upload_file_view.nib/runtime.nib +0 -0
  66. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/upload_types_view.nib/objects-11.0+.nib +0 -0
  67. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/upload_types_view.nib/runtime.nib +0 -0
  68. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/vTZ-J7-KVA-view-nnL-sn-lBz.nib/objects-11.0+.nib +0 -0
  69. package/ios/Frameworks/identomat.framework/Storyboard.storyboardc/vTZ-J7-KVA-view-nnL-sn-lBz.nib/runtime.nib +0 -0
  70. package/ios/Frameworks/identomat.framework/_CodeSignature/CodeResources +1045 -0
  71. package/ios/Frameworks/identomat.framework/en.lproj/languages.strings +0 -0
  72. package/ios/Frameworks/identomat.framework/es.lproj/languages.strings +0 -0
  73. package/ios/Frameworks/identomat.framework/identomat +0 -0
  74. package/ios/Frameworks/identomat.framework/ka.lproj/languages.strings +0 -0
  75. package/ios/Frameworks/identomat.framework/ru.lproj/languages.strings +0 -0
  76. package/ios/Identomat-Bridging-Header.h +7 -0
  77. package/ios/Identomat.m +26 -0
  78. package/ios/Identomat.swift +122 -0
  79. package/ios/Identomat.xcodeproj/project.pbxproj +333 -0
  80. package/ios/Identomat.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  81. package/ios/Identomat.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  82. package/ios/Identomat.xcodeproj/project.xcworkspace/xcuserdata/otosiradze.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  83. package/ios/Identomat.xcodeproj/xcuserdata/otosiradze.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +6 -0
  84. package/ios/Identomat.xcodeproj/xcuserdata/otosiradze.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
  85. package/ios/Identomat.xcworkspace/contents.xcworkspacedata +7 -0
  86. package/ios/Identomat.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  87. package/ios/Identomat.xcworkspace/xcuserdata/otosiradze.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  88. package/package.json +14 -0
  89. package/react-native-identomat.podspec +44 -0
  90. package/windows/RNIdentomat/Properties/AssemblyInfo.cs +30 -0
  91. package/windows/RNIdentomat/Properties/RNIdentomat.rd.xml +28 -0
  92. package/windows/RNIdentomat/RNIdentomat.csproj +153 -0
  93. package/windows/RNIdentomat/RNIdentomatModule.cs +33 -0
  94. package/windows/RNIdentomat/RNIdentomatPackage.cs +53 -0
  95. package/windows/RNIdentomat/project.json +16 -0
  96. package/windows/RNIdentomat.sln +89 -0
package/README.md ADDED
@@ -0,0 +1,44 @@
1
+
2
+ # react-native-identomat
3
+
4
+ ## Getting started
5
+
6
+ `$ npm install react-native-identomat --save`
7
+
8
+
9
+ #### iOS
10
+
11
+ 1. If you don't use swift, you need create empty swift file with bridging header in you ios project
12
+ 2. run pod install in you ios project
13
+
14
+ #### Android
15
+
16
+ 1. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
17
+ ```
18
+ allprojects {
19
+ repositories {
20
+ google ()
21
+ jcenter ()
22
+ maven {
23
+ url = uri("https://gitlab.identomat.com/api/v4/projects/445/packages/maven/")
24
+ }
25
+ }
26
+ }
27
+ ...
28
+ ```
29
+
30
+
31
+ ## Usage
32
+ ```javascript
33
+ import identomat from 'react-native-identomat';
34
+ class Callback {
35
+ callback() {
36
+ console.log('finished')
37
+
38
+ }
39
+ }
40
+ identomat.setCallBack(new Callback())
41
+ identomat.setBaseUrl(config.baseUrl);
42
+ identomat.start(config.sessionKey);
43
+
44
+ ```
@@ -0,0 +1,48 @@
1
+
2
+ buildscript {
3
+ repositories {
4
+ google()
5
+ jcenter()
6
+ }
7
+
8
+ dependencies {
9
+ classpath("com.android.tools.build:gradle:4.1.1")
10
+ }
11
+ }
12
+
13
+ apply plugin: 'com.android.library'
14
+
15
+ android {
16
+ compileSdkVersion 33
17
+ buildToolsVersion = "33.0.0"
18
+
19
+ defaultConfig {
20
+ minSdkVersion 21
21
+ targetSdkVersion 33
22
+ versionCode 1
23
+ versionName "1.0"
24
+ }
25
+ lintOptions {
26
+ abortOnError false
27
+ }
28
+
29
+ }
30
+
31
+ repositories {
32
+ jcenter()
33
+ maven {
34
+ url = uri("https://gitlab.identomat.com/api/v4/projects/445/packages/maven/")
35
+ }
36
+ }
37
+
38
+
39
+ dependencies {
40
+ implementation 'com.android.support.constraint:constraint-layout:1.0.2'
41
+ implementation 'com.facebook.react:react-native:+'
42
+ implementation 'androidx.appcompat:appcompat:1.1.0'
43
+ implementation 'androidx.legacy:legacy-support-v4:1.0.0'
44
+ // implementation 'com.android.support:recyclerview-v7:28.0.0'
45
+ implementation 'com.android.support:design:28.0.0'
46
+ implementation 'com.identomat:identomat-sdk:1.1.60'
47
+ implementation 'androidx.fragment:fragment:1.1.0-alpha05'
48
+ }
@@ -0,0 +1,5 @@
1
+ distributionBase=GRADLE_USER_HOME
2
+ distributionPath=wrapper/dists
3
+ distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
4
+ zipStoreBase=GRADLE_USER_HOME
5
+ zipStorePath=wrapper/dists
@@ -0,0 +1,7 @@
1
+
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ package="com.reactlibrary">
4
+
5
+
6
+ </manifest>
7
+
@@ -0,0 +1,86 @@
1
+ package com.reactlibrary;
2
+
3
+ import android.app.Activity;
4
+ import android.content.Intent;
5
+ import android.content.IntentFilter;
6
+ import android.widget.Toast;
7
+ import android.util.Log;
8
+
9
+
10
+ // https://facebook.github.io/react-native/
11
+ import org.json.JSONException;
12
+ import org.json.JSONObject;
13
+
14
+ import com.facebook.react.ReactInstanceManager;
15
+ import com.facebook.react.ReactNativeHost;
16
+ import com.facebook.react.bridge.CatalystInstance;
17
+ import com.facebook.react.bridge.NativeModule;
18
+ import com.facebook.react.bridge.ReactApplicationContext;
19
+ import com.facebook.react.bridge.ReactContext;
20
+ import com.facebook.react.bridge.ReactContextBaseJavaModule;
21
+ import com.facebook.react.bridge.ReactMethod;
22
+ import com.facebook.react.bridge.WritableNativeArray;
23
+ import com.reizomat.identomat.IdentomatKotlinObjectBridge;
24
+ import com.reizomat.identomat.IdentomatBridgeCallback;
25
+
26
+ import org.json.JSONObject;
27
+
28
+ import java.util.HashMap;
29
+ import java.util.Map;
30
+ import java.util.Iterator;
31
+
32
+
33
+
34
+ public class BridgeModule extends ReactContextBaseJavaModule {
35
+ private static ReactApplicationContext reactContext;
36
+ JSONObject identomatConfig = null;
37
+ static IdentomatKotlinObjectBridge identomatSDK = new IdentomatKotlinObjectBridge();
38
+ String mLanguage=null;
39
+ BridgeModule(ReactApplicationContext context){
40
+ super(context);
41
+ BridgeModule.reactContext = context;
42
+ }
43
+
44
+ @Override
45
+ public String getName(){
46
+ return "BridgeModule";
47
+ }
48
+ public void callback(){
49
+
50
+ if (reactContext != null) {
51
+ CatalystInstance catalystInstance = reactContext.getCatalystInstance();
52
+ WritableNativeArray params = new WritableNativeArray();
53
+ // params.pushString("session");
54
+ identomatSDK.setCallback(new IdentomatBridgeCallback(){
55
+ @Override
56
+ public void invoke(){
57
+ System.out.println("---------------------");
58
+ catalystInstance.callFunction("JavaScriptVisibleToJava", "callback",params);
59
+ }
60
+ });
61
+ }
62
+ }
63
+
64
+
65
+
66
+
67
+ @ReactMethod
68
+ public void setBaseUrl(String baseUrl){
69
+ identomatSDK.setBaseUrl(baseUrl);
70
+ }
71
+ @ReactMethod
72
+ public void start(String mSessionKey){
73
+ callback();
74
+ // IdentomatBroadcastReceiver mReceiver = new IdentomatBroadcastReceiver();
75
+ // IntentFilter filter = new IntentFilter("com.identomat.Broadcast");
76
+ // reactContext.registerReceiver(mReceiver, filter);
77
+ // try {
78
+ // identomatConfig=new JSONObject(identomatConfigString);
79
+
80
+ // } catch (JSONException e) {
81
+ // e.printStackTrace();
82
+ // }
83
+ identomatSDK.setUp(mSessionKey);
84
+ reactContext.startActivity(identomatSDK.getIdentomatActivity(reactContext));
85
+ }
86
+ }
@@ -0,0 +1,36 @@
1
+ package com.reactlibrary;
2
+
3
+
4
+ import com.facebook.react.ReactPackage;
5
+ import com.facebook.react.bridge.JavaScriptModule;
6
+ import com.facebook.react.bridge.NativeModule;
7
+ import com.facebook.react.bridge.ReactApplicationContext;
8
+ import com.facebook.react.uimanager.ViewManager;
9
+
10
+ import java.util.ArrayList;
11
+ import java.util.Collections;
12
+ import java.util.List;
13
+
14
+ import com.reactlibrary.BridgeModule;
15
+
16
+ public class BridgePackage implements ReactPackage{
17
+
18
+
19
+
20
+ @Override
21
+ public List<NativeModule> createNativeModules(ReactApplicationContext reactContext){
22
+ List<NativeModule> modules = new ArrayList<>();
23
+ modules.add(new BridgeModule(reactContext));
24
+ return modules;
25
+ }
26
+
27
+ public List<Class<? extends JavaScriptModule>> createJSModules() {
28
+ return Collections.emptyList();
29
+ }
30
+
31
+ @Override
32
+ public List<ViewManager> createViewManagers(ReactApplicationContext reactContext){
33
+ return Collections.emptyList();
34
+ }
35
+
36
+ }
package/index.js ADDED
@@ -0,0 +1,46 @@
1
+ import React from 'react';
2
+
3
+ import {
4
+ NativeEventEmitter,
5
+ NativeModules,
6
+ Platform
7
+ } from 'react-native';
8
+ import BatchedBridge from 'react-native/Libraries/BatchedBridge/BatchedBridge';
9
+ const eventEmitterModule = NativeModules.EventEmitter;
10
+ class Identomat {
11
+ async setBaseUrl(baseUrl) {
12
+ if(Platform.OS == "android"){
13
+ NativeModules.BridgeModule.setBaseUrl(baseUrl);
14
+ }else if(Platform.OS == "ios"){
15
+ NativeModules.Identomat.start(JSON.stringify(identomatConfig),
16
+ sessionKey,
17
+ );
18
+ }
19
+ }
20
+
21
+ async start(sessionKey) {
22
+ if(Platform.OS == "android"){
23
+ NativeModules.BridgeModule.start(sessionKey);
24
+ }else if(Platform.OS == "ios"){
25
+ console.log(NativeModules.Identomat)
26
+
27
+
28
+ NativeModules.Identomat.start(JSON.stringify(identomatConfig),
29
+ sessionKey,
30
+ );
31
+ }
32
+ }
33
+
34
+ setCallback(Callback){
35
+ if (Platform.OS=="android"){
36
+ BatchedBridge.registerCallableModule('JavaScriptVisibleToJava', Callback);
37
+ }else if(Platform.OS=="ios"){
38
+ NativeModules.Identomat.callBack(function(error,data){
39
+ resultClass.getResult(sessionId)
40
+ })
41
+ }
42
+ }
43
+ }
44
+
45
+ const identomat=new Identomat()
46
+ export default identomat