accurascan_kyc 1.2.8 → 1.2.9

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.
@@ -22,7 +22,8 @@ Pod::Spec.new do |s|
22
22
  s.dependency "React-Core"
23
23
  s.static_framework = true
24
24
  # s.dependency "AccuraKYC","4.0.2"
25
- s.dependency "AccuraKYC_Sim","4.0.5"
25
+ # s.dependency "AccuraKYC","4.0.4"
26
+ s.dependency 'AccuraKYC_Sim', '4.0.9'
26
27
  # Don't install the dependencies when we run `pod install` in the old architecture.
27
28
  if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
28
29
  s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
@@ -61,19 +61,19 @@ android {
61
61
  targetCompatibility JavaVersion.VERSION_1_8
62
62
  }
63
63
 
64
- packagingOptions {
65
- pickFirst 'lib/arm64-v8a/libcrypto.so'
66
- pickFirst 'lib/arm64-v8a/libssl.so'
67
-
68
- pickFirst 'lib/armeabi-v7a/libcrypto.so'
69
- pickFirst 'lib/armeabi-v7a/libssl.so'
70
-
71
- pickFirst 'lib/x86/libcrypto.so'
72
- pickFirst 'lib/x86/libssl.so'
73
-
74
- pickFirst 'lib/x86_64/libcrypto.so'
75
- pickFirst 'lib/x86_64/libssl.so'
76
- }
64
+ packagingOptions {
65
+ pickFirst 'lib/arm64-v8a/libcrypto.so'
66
+ pickFirst 'lib/arm64-v8a/libssl.so'
67
+
68
+ pickFirst 'lib/armeabi-v7a/libcrypto.so'
69
+ pickFirst 'lib/armeabi-v7a/libssl.so'
70
+
71
+ pickFirst 'lib/x86/libcrypto.so'
72
+ pickFirst 'lib/x86/libssl.so'
73
+
74
+ pickFirst 'lib/x86_64/libcrypto.so'
75
+ pickFirst 'lib/x86_64/libssl.so'
76
+ }
77
77
  splits {
78
78
  abi {
79
79
  reset()
@@ -97,14 +97,14 @@ dependencies {
97
97
  //noinspection GradleDynamicVersion
98
98
  implementation "com.facebook.react:react-native:+"
99
99
  implementation fileTree(dir: 'libs', include: ['*.jar'])
100
- implementation 'androidx.appcompat:appcompat:1.6.0'
101
- implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
102
- // Update OCR
103
- implementation 'com.github.accurascan:AccuraOCR:5.5.0.0'
104
- // FaceMatch has no issue
105
- implementation 'com.github.accurascan:AccuraFaceMatch:3.2.2'
106
- // Update Liveness
107
- implementation 'com.github.accurascan:Liveness-Android:3.3.1.1'
100
+ implementation 'androidx.appcompat:appcompat:1.6.0'
101
+ implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
102
+ // Update OCR
103
+ implementation 'com.github.accurascan:AccuraOCR:6.1.3'
104
+ // FaceMatch has no issue
105
+ implementation 'com.github.accurascan:AccuraFaceMatch:3.2.5'
106
+ // Update Liveness
107
+ implementation 'com.github.accurascan:Liveness-Android:3.3.1.1'
108
108
  implementation 'com.squareup.picasso:picasso:2.71828'
109
109
  }
110
110
 
@@ -64,6 +64,9 @@ public class AccurascanKycModule extends ReactContextBaseJavaModule {
64
64
  public static JSONObject actualAccuraErrorConfg = new JSONObject();
65
65
 
66
66
  private String bType;
67
+ public static Boolean isDynamic = false;
68
+ public static String LicenseAbsolutePath = "";
69
+ public static String FaceLicenseAbsolutePath = "";
67
70
 
68
71
  public AccurascanKycModule(ReactApplicationContext reactContext) {
69
72
  super(reactContext);
@@ -127,7 +130,7 @@ public class AccurascanKycModule extends ReactContextBaseJavaModule {
127
130
 
128
131
  @ReactMethod
129
132
  public boolean getMetaData( Callback callbackContext ) throws JSONException {
130
-
133
+ isDynamic = false;
131
134
  onResult = callbackContext;
132
135
  RecogEngine recogEngine = new RecogEngine();
133
136
  AccuraLog.enableLogs(false);
@@ -193,6 +196,83 @@ public class AccurascanKycModule extends ReactContextBaseJavaModule {
193
196
  return true;
194
197
  }
195
198
 
199
+ @ReactMethod
200
+ public boolean getDynamicMetaData(ReadableArray argsNew, Callback callbackContext ) throws JSONException {
201
+
202
+ onResult = callbackContext;
203
+ RecogEngine recogEngine = new RecogEngine();
204
+ AccuraLog.enableLogs(false);
205
+ recogEngine.setDialog(false);
206
+ JSONObject results = new JSONObject();
207
+
208
+ JSONArray args = ReactNativeJSON.convertArrayToJson(argsNew);
209
+ JSONObject accuraConf = args.getJSONObject(0);
210
+
211
+ LicenseAbsolutePath = accuraConf.getString("licensePath");
212
+ FaceLicenseAbsolutePath = accuraConf.getString("faceLicensePath");
213
+ isDynamic = true;
214
+
215
+ RecogEngine.SDKModel sdkModel = recogEngine.initEngine(getReactApplicationContext(), LicenseAbsolutePath);
216
+
217
+ if (sdkModel.i >= 0) {
218
+ // AndroidNetworking.initialize(getReactApplicationContext(), UnsafeOkHttpClient.getUnsafeOkHttpClient());
219
+ results.put("sdk_version", recogEngine.getVersion());
220
+
221
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !isPermissionsGranted(getCurrentActivity())) {
222
+ requestCameraPermission();
223
+ }
224
+
225
+ results.put("isValid", true);
226
+ // if OCR enable then get card list
227
+ if (sdkModel.isOCREnable) {
228
+ results.put("isOCR", true);
229
+ List<ContryModel> modelList = recogEngine.getCardList(getCurrentActivity());
230
+ JSONArray countries = new JSONArray();
231
+ for (int i = 0; i < modelList.size(); i++) {
232
+ JSONObject country = new JSONObject();
233
+ // if (Objects.equals(modelList.get(i).getCountry_name(), "Saint Kitts and Nevis")) {
234
+ // results.put("isSchengen", true);
235
+ // } else {
236
+ country.put("name", modelList.get(i).getCountry_name());
237
+ country.put("id", modelList.get(i).getCountry_id());
238
+ JSONArray cards = new JSONArray();
239
+ List<ContryModel.CardModel> cardList = modelList.get(i).getCards();
240
+ for (int j = 0; j < cardList.size(); j++) {
241
+ JSONObject card = new JSONObject();
242
+ card.put("name", cardList.get(j).getCard_name());
243
+ card.put("id", cardList.get(j).getCard_id());
244
+ card.put("type", cardList.get(j).getCard_type());
245
+ cards.put(card);
246
+ }
247
+ country.put("cards", cards);
248
+ countries.put(country);
249
+ // }
250
+ }
251
+ results.put("countries", countries);
252
+ }
253
+ results.put("isOCREnable", sdkModel.isOCREnable);
254
+ results.put("isBarcode", sdkModel.isAllBarcodeEnable);
255
+ if (sdkModel.isAllBarcodeEnable) {
256
+ List<BarcodeFormat> CODE_NAMES = BarcodeFormat.getList();
257
+ JSONArray barcodes = new JSONArray();
258
+ for (int i = 0; i < CODE_NAMES.size(); i++) {
259
+ JSONObject barcode = new JSONObject();
260
+ barcode.put("name", CODE_NAMES.get(i).barcodeTitle);
261
+ barcode.put("type", CODE_NAMES.get(i).formatsType);
262
+ barcodes.put(barcode);
263
+ }
264
+ results.put("barcodes", barcodes);
265
+ }
266
+ results.put("isBankCard", sdkModel.isBankCardEnable);
267
+ results.put("isMRZ", sdkModel.isMRZEnable);
268
+
269
+ } else {
270
+ results.put("isValid", false);
271
+ }
272
+ callbackContext.invoke(null, results.toString());
273
+ return true;
274
+ }
275
+
196
276
  @ReactMethod
197
277
  public boolean setupAccuraConfig(ReadableArray argsNew, Callback result) throws JSONException {
198
278
 
@@ -353,6 +433,8 @@ public class AccurascanKycModule extends ReactContextBaseJavaModule {
353
433
  ActivityFaceMatch.faceMatchConfig = args.getJSONObject(1);
354
434
  ActivityFaceMatch.sface = accuraConf.getString("face1");
355
435
  ActivityFaceMatch.mface = accuraConf.getString("face2");
436
+ ActivityFaceMatch.faceLicensePath = FaceLicenseAbsolutePath;
437
+ ActivityFaceMatch.isDynamic = isDynamic;
356
438
  Intent intent = new Intent(getCurrentActivity(), ActivityFaceMatch.class);
357
439
  getCurrentActivity().startActivity(intent);
358
440
  return true;
@@ -368,6 +450,8 @@ public class AccurascanKycModule extends ReactContextBaseJavaModule {
368
450
  JSONObject accuraConf = args.getJSONObject(0);
369
451
  ActivityFaceMatch.sface = accuraConf.getString("face1");
370
452
  ActivityFaceMatch.mface = accuraConf.getString("face2");
453
+ ActivityFaceMatch.faceLicensePath = FaceLicenseAbsolutePath;
454
+ ActivityFaceMatch.isDynamic = isDynamic;
371
455
  // JSONObject config = args.getJSONObject(1);
372
456
  Intent intent = new Intent(getCurrentActivity(), ActivityFaceMatch.class);
373
457
  // intent = addDefaultConfigs(intent, accuraConf);
@@ -385,6 +469,8 @@ public class AccurascanKycModule extends ReactContextBaseJavaModule {
385
469
  JSONObject accuraConf = args.getJSONObject(0);
386
470
  ActivityFaceMatch.sface = accuraConf.getString("face1");
387
471
  ActivityFaceMatch.mface = accuraConf.getString("face2");
472
+ ActivityFaceMatch.faceLicensePath = FaceLicenseAbsolutePath;
473
+ ActivityFaceMatch.isDynamic = isDynamic;
388
474
  // JSONObject config = args.getJSONObject(1);
389
475
  Intent intent = new Intent(getCurrentActivity(), ActivityFaceMatch.class);
390
476
  // intent = ActivityFaceMatch(intent, accuraConf);
@@ -405,6 +491,8 @@ public class AccurascanKycModule extends ReactContextBaseJavaModule {
405
491
  ActivityFaceMatch.faceMatchConfig = args.getJSONObject(1);
406
492
  ActivityFaceMatch.sface = accuraConf.getString("face1");
407
493
  ActivityFaceMatch.mface = accuraConf.getString("face2");
494
+ ActivityFaceMatch.faceLicensePath = FaceLicenseAbsolutePath;
495
+ ActivityFaceMatch.isDynamic = isDynamic;
408
496
  // JSONObject config = args.getJSONObject(1);
409
497
  Intent intent = new Intent(getCurrentActivity(), ActivityFaceMatch.class);
410
498
  // intent = addDefaultConfigs(intent, accuraConf);
@@ -527,6 +615,8 @@ public class AccurascanKycModule extends ReactContextBaseJavaModule {
527
615
  OcrResultActivity.face1 = BitmapFactory.decodeFile(uri.replace("file://",""));
528
616
  OcrResultActivity.which = 0;
529
617
  OcrResultActivity.faceConfig = arg.getJSONObject(1);
618
+ OcrResultActivity.faceLicensePath = FaceLicenseAbsolutePath;
619
+ OcrResultActivity.isDynamic = isDynamic;
530
620
  Intent intent = new Intent(getCurrentActivity(),OcrResultActivity.class);
531
621
  Objects.requireNonNull(getCurrentActivity()).startActivity(intent);
532
622
 
@@ -44,7 +44,8 @@ public class ActivityFaceMatch extends Activity implements FaceCallback {
44
44
  public static int which;
45
45
  public static int No;
46
46
  public static JSONObject faceMatchConfig;
47
-
47
+ public static String faceLicensePath;
48
+ public static Boolean isDynamic;
48
49
 
49
50
  @Override
50
51
  protected void onCreate(Bundle savedInstanceState) {
@@ -53,7 +54,15 @@ public class ActivityFaceMatch extends Activity implements FaceCallback {
53
54
 
54
55
  helper = new FaceHelper(this);
55
56
  helper.setFaceMatchCallBack(this);
56
- helper.initEngine();
57
+ // helper.initEngine();
58
+ if(isDynamic){
59
+ // System.out.println("FaceMatch activity isDynamic true");
60
+ helper.initEngine(faceLicensePath);
61
+ }else{
62
+ // System.out.println("FaceMatch activity isDynamic false");
63
+ helper.initEngine();
64
+ }
65
+
57
66
  image1 = new FaceImageview(this); //initialize the view of front image
58
67
  image2 = new FaceImageview(this);
59
68
  bundle = getIntent().getExtras();
@@ -31,7 +31,7 @@ import androidx.annotation.Nullable;
31
31
 
32
32
  import com.accurascan.facedetection.utils.AccuraLivenessLog;
33
33
  import com.accurascan.ocr.mrz.CameraView;
34
- import com.accurascan.ocr.mrz.customview.CustomTextView;
34
+ // import com.accurascan.ocr.mrz.customview.CustomTextView;
35
35
  import com.accurascan.ocr.mrz.interfaces.OcrCallback;
36
36
  import com.accurascan.ocr.mrz.model.BarcodeFormat;
37
37
  import com.accurascan.ocr.mrz.model.CardDetails;
@@ -47,6 +47,9 @@ public class OcrResultActivity extends Activity implements FaceCallback {
47
47
 
48
48
  public static JSONObject faceConfig;
49
49
  public static JSONObject livenessConfig;
50
+ public static String faceLicensePath;
51
+ public static Boolean isDynamic;
52
+
50
53
  ImageView ivUserProfile2;
51
54
  View loutImg2;
52
55
  public static int which;
@@ -62,7 +65,14 @@ public class OcrResultActivity extends Activity implements FaceCallback {
62
65
 
63
66
  faceHelper = new FaceHelper(this);
64
67
  faceHelper.setFaceMatchCallBack(this);
65
- faceHelper.initEngine();
68
+ // faceHelper.initEngine();
69
+ if(isDynamic){
70
+ // System.out.println("FaceMatch activity isDynamic true");
71
+ faceHelper.initEngine(faceLicensePath);
72
+ }else{
73
+ // System.out.println("FaceMatch activity isDynamic false");
74
+ faceHelper.initEngine();
75
+ }
66
76
  if (getIntent().getIntExtra("app_orientation", 1) != 0) {
67
77
  setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
68
78
  } else {
@@ -118,7 +118,7 @@
118
118
  android:layout_alignParentEnd="true"
119
119
  android:layout_alignParentBottom="true">
120
120
 
121
- <com.accurascan.ocr.mrz.customview.CustomTextView
121
+ <TextView
122
122
  android:layout_width="wrap_content"
123
123
  android:layout_height="wrap_content"
124
124
  android:text=""
@@ -127,7 +127,7 @@
127
127
  android:layout_marginEnd="1dp"
128
128
  android:layout_marginBottom="-1dp"
129
129
  android:textSize="8sp"
130
- app:typeface="ALLER_STD_REG"/>
130
+ />
131
131
 
132
132
  <ImageView
133
133
  android:id="@+id/imageLOGO"
@@ -118,7 +118,7 @@
118
118
  android:layout_alignParentEnd="true"
119
119
  android:layout_alignParentBottom="true">
120
120
 
121
- <com.accurascan.ocr.mrz.customview.CustomTextView
121
+ <TextView
122
122
  android:layout_width="wrap_content"
123
123
  android:layout_height="wrap_content"
124
124
  android:text=""
@@ -127,7 +127,7 @@
127
127
  android:layout_marginEnd="1dp"
128
128
  android:layout_marginBottom="-1dp"
129
129
  android:textSize="8sp"
130
- app:typeface="ALLER_STD_REG"/>
130
+ />
131
131
 
132
132
  <ImageView
133
133
  android:id="@+id/imageLOGO"
@@ -4,6 +4,8 @@
4
4
 
5
5
  RCT_EXTERN_METHOD(getMetaData:(RCTResponseSenderBlock)callback)
6
6
 
7
+ RCT_EXTERN_METHOD(getDynamicMetaData:(NSArray *)argsNew callback:(RCTResponseSenderBlock)callback)
8
+
7
9
  RCT_EXTERN_METHOD(setupAccuraConfig:(NSArray *)argsNew callback:(RCTResponseSenderBlock)callback)
8
10
 
9
11
  RCT_EXTERN_METHOD(startMRZ:(NSArray *)argsNew callback:(RCTResponseSenderBlock)callback)
@@ -21,6 +21,9 @@ class AccurascanKyc: NSObject {
21
21
  var accuraTitleMsg:NSDictionary = [:]
22
22
  var viewController: UIViewController? = nil;
23
23
  var viewControllerWindow: UIWindow? = nil;
24
+ var LicenseAbsoultPath:String = "";
25
+ var FaceLicenseAbsoultPath:String = "";
26
+ var isDynamic:Bool = false;
24
27
 
25
28
  var actualConfig:NSDictionary = [
26
29
  "setFaceBlurPercentage": 80,
@@ -126,11 +129,25 @@ class AccurascanKyc: NSObject {
126
129
  return nil
127
130
  }
128
131
 
132
+ func faceLicenseInit() {
133
+ EngineWrapper.faceEngineClose()
134
+ let fmInit = EngineWrapper.isEngineInit()
135
+ if !fmInit{
136
+ if (isDynamic){
137
+ EngineWrapper.faceEngineInit(FaceLicenseAbsoultPath)
138
+ }else{
139
+ EngineWrapper.faceEngineInit()
140
+ }
141
+
142
+ }
143
+ }
144
+
129
145
 
130
146
  @objc(getMetaData:)
131
147
  func getMetaData(_ callback: @escaping RCTResponseSenderBlock) {
132
148
  self.goNativeCallBack = callback
133
149
  var results:[String: Any] = [:]
150
+ isDynamic = false
134
151
  results["isValid"] = false
135
152
  accuraCameraWrapper = AccuraCameraWrapper.init()
136
153
  // DispatchQueue.main.async {
@@ -200,6 +217,93 @@ class AccurascanKyc: NSObject {
200
217
  }
201
218
  }
202
219
 
220
+ @objc(getDynamicMetaData:callback:)
221
+ func getDynamicMetaData(_ argsNew: NSArray, _ callback: @escaping RCTResponseSenderBlock) {
222
+ goNativeArgs = argsNew
223
+ goNativeCallBack = callback
224
+ isDynamic = true
225
+ var results:[String: Any] = [:]
226
+ results["isValid"] = false
227
+
228
+ guard let configs = goNativeArgs[0] as? [String: Any] else {
229
+ // print("Invalid argument format")
230
+ results["status"] = "Invalid argument format"
231
+ self.goNativeCallBack?([ AccurascanKyc.convertJSONString(results: results),NSNull()])
232
+ return
233
+ }
234
+ LicenseAbsoultPath = configs["licensePath"] as? String ?? ""
235
+ FaceLicenseAbsoultPath = configs["faceLicensePath"] as? String ?? ""
236
+
237
+ accuraCameraWrapper = AccuraCameraWrapper.init()
238
+ // DispatchQueue.main.async {
239
+ // self.accuraCameraWrapper?.setDefaultDialogs(true)
240
+ // self.accuraCameraWrapper?.showLogFile(true) // Set true to print log from KYC SDK
241
+ // }
242
+
243
+ DispatchQueue.main.async {
244
+ self.viewController = RCTPresentedViewController()!
245
+ self.viewControllerWindow = RCTKeyWindow()!
246
+ let sdkModel = self.accuraCameraWrapper!.loadEngine(self.LicenseAbsoultPath, documentDirectory: NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0] as String)
247
+
248
+
249
+
250
+ if sdkModel!.i > 0 {
251
+ var countries:[Any] = []
252
+ results["sdk_version"] = ""
253
+ results["isValid"] = true
254
+ results["isOCR"] = sdkModel!.isOCREnable
255
+ results["isOCREnable"] = sdkModel!.isOCREnable
256
+ results["isBarcode"] = sdkModel!.isBarcodeEnable
257
+ results["isBankCard"] = sdkModel!.isBankCardEnable
258
+ results["isMRZ"] = sdkModel!.isMRZEnable
259
+
260
+
261
+ let countryListStr = self.accuraCameraWrapper!.getOCRList();
262
+ for item in countryListStr ?? [] {
263
+ let cntry = item as! NSDictionary
264
+ var country:[String: Any] = [:]
265
+ // if cntry.value(forKey: "country_name") as? String == "Saint Kitts and Nevis" {
266
+ // results["isSchengen"] = true
267
+ // }else{
268
+ country["name"] = cntry.value(forKey: "country_name")
269
+ country["id"] = cntry.value(forKey: "country_id")
270
+ var cards:[[String: Any]] = []
271
+ for cd in cntry.value(forKey: "cards") as! NSArray {
272
+ let cardF = cd as! NSDictionary
273
+ var card:[String: Any] = [:]
274
+ card["name"] = cardF.value(forKey:"card_name")
275
+ card["id"] = cardF.value(forKey:"card_id")
276
+ card["type"] = cardF.value(forKey:"card_type")
277
+ cards.append(card)
278
+ }
279
+ country["cards"] = cards
280
+ countries.append(country)
281
+ // }
282
+ }
283
+ results["countries"] = countries
284
+ if sdkModel!.isBarcodeEnable {
285
+ var barcodes:[[String: String]] = []
286
+ barcodes.append(["name": "ALL FORMATS","type": "ALL FORMATS"])
287
+ barcodes.append(["name": "EAN-8", "type": "EAN-8"])
288
+ barcodes.append(["name": "EAN-13", "type": "EAN-13"])
289
+ barcodes.append(["name": "PDF417", "type": "PDF417"])
290
+ barcodes.append(["name": "AZTEC", "type": "AZTEC"])
291
+ barcodes.append(["name": "CODE 128", "type": "CODE 128"])
292
+ barcodes.append(["name": "CODE 39", "type": "CODE 39"])
293
+ barcodes.append(["name": "CODE 93", "type": "CODE 93"])
294
+ barcodes.append(["name": "DATA MATRIX", "type": "DATA MATRIX"])
295
+ barcodes.append(["name": "QR CODE", "type": "QR CODE"])
296
+ barcodes.append(["name": "UPC-E", "type": "UPC-E"])
297
+ barcodes.append(["name": "UPC-A", "type": "UPC-A"])
298
+ barcodes.append(["name": "CODABAR", "type": "CODABAR"])
299
+ results["barcodes"] = barcodes
300
+ }
301
+ }
302
+ self.goNativeCallBack!([NSNull(), AccurascanKyc.convertJSONString(results: results)])
303
+ // }
304
+ }
305
+ }
306
+
203
307
  @objc(startOcrWithCard:callback:)
204
308
  func startOcrWithCard(_ argsNew: NSArray, callback: @escaping RCTResponseSenderBlock){
205
309
  lvfm.faceImage = nil
@@ -395,13 +499,14 @@ class AccurascanKyc: NSObject {
395
499
  self.goNativeArgs = argsNew;
396
500
  let face:NSDictionary
397
501
  face = goNativeArgs[0] as! NSDictionary
398
- EngineWrapper.faceEngineClose()
399
- let fmInit = EngineWrapper.isEngineInit()
400
- if !fmInit{
401
- DispatchQueue.main.async {
402
- EngineWrapper.faceEngineInit()
403
- }
404
- }
502
+ faceLicenseInit()
503
+ // EngineWrapper.faceEngineClose()
504
+ // let fmInit = EngineWrapper.isEngineInit()
505
+ // if !fmInit{
506
+ // DispatchQueue.main.async {
507
+ // EngineWrapper.faceEngineInit()
508
+ // }
509
+ // }
405
510
  let fmValue = EngineWrapper.getEngineInitValue() //get engineWrapper load status
406
511
  if fmValue == -20{
407
512
  self.goNativeCallBack!(["key not found", NSNull()])
@@ -433,11 +538,12 @@ class AccurascanKyc: NSObject {
433
538
  self.goNativeArgs = argsNew;
434
539
  let face:NSDictionary
435
540
  face = self.goNativeArgs[0] as! NSDictionary
436
- EngineWrapper.faceEngineClose()
437
- let fmInit = EngineWrapper.isEngineInit()
438
- if !fmInit{
439
- EngineWrapper.faceEngineInit()
440
- }
541
+ self.faceLicenseInit()
542
+ // EngineWrapper.faceEngineClose()
543
+ // let fmInit = EngineWrapper.isEngineInit()
544
+ // if !fmInit{
545
+ // EngineWrapper.faceEngineInit()
546
+ // }
441
547
  let fmValue = EngineWrapper.getEngineInitValue() //get engineWrapper load status
442
548
  if fmValue == -20{
443
549
  self.goNativeCallBack!(["key not found", NSNull()])
@@ -467,11 +573,12 @@ class AccurascanKyc: NSObject {
467
573
  DispatchQueue.main.async {
468
574
  self.goNativeCallBack = callback;
469
575
  self.goNativeArgs = argsNew;
470
- EngineWrapper.faceEngineClose()
471
- let fmInit = EngineWrapper.isEngineInit()
472
- if !fmInit{
473
- EngineWrapper.faceEngineInit()
474
- }
576
+ self.faceLicenseInit()
577
+ // EngineWrapper.faceEngineClose()
578
+ // let fmInit = EngineWrapper.isEngineInit()
579
+ // if !fmInit{
580
+ // EngineWrapper.faceEngineInit()
581
+ // }
475
582
  let fmValue = EngineWrapper.getEngineInitValue() //get engineWrapper load status
476
583
  if fmValue == -20{
477
584
  self.sendError(msg: "Key not found")
@@ -514,11 +621,12 @@ class AccurascanKyc: NSObject {
514
621
  DispatchQueue.main.async {
515
622
  self.goNativeCallBack = callback;
516
623
  self.goNativeArgs = argsNew;
517
- EngineWrapper.faceEngineClose()
518
- let fmInit = EngineWrapper.isEngineInit()
519
- if !fmInit{
520
- EngineWrapper.faceEngineInit()
521
- }
624
+ self.faceLicenseInit()
625
+ // EngineWrapper.faceEngineClose()
626
+ // let fmInit = EngineWrapper.isEngineInit()
627
+ // if !fmInit{
628
+ // EngineWrapper.faceEngineInit()
629
+ // }
522
630
  let fmValue = EngineWrapper.getEngineInitValue() //get engineWrapper load status
523
631
  if fmValue == -20{
524
632
  self.sendError(msg: "Key not found")
@@ -557,13 +665,14 @@ class AccurascanKyc: NSObject {
557
665
  DispatchQueue.main.async {
558
666
  self.goNativeCallBack = callback;
559
667
  self.goNativeArgs = argsNew;
560
- EngineWrapper.faceEngineClose()
561
- let fmInit = EngineWrapper.isEngineInit()
562
- if !fmInit{
563
- DispatchQueue.main.async {
564
- EngineWrapper.faceEngineInit()
565
- }
566
- }
668
+ self.faceLicenseInit()
669
+ // EngineWrapper.faceEngineClose()
670
+ // let fmInit = EngineWrapper.isEngineInit()
671
+ // if !fmInit{
672
+ // DispatchQueue.main.async {
673
+ // EngineWrapper.faceEngineInit()
674
+ // }
675
+ // }
567
676
  let fmValue = EngineWrapper.getEngineInitValue() //get engineWrapper load status
568
677
  if fmValue == -20{
569
678
  // goNativeCallBack!(FlutterError.init(code: "101", message: "Key not found", details: nil))
@@ -603,11 +712,12 @@ class AccurascanKyc: NSObject {
603
712
  DispatchQueue.main.async {
604
713
  self.goNativeCallBack = callback;
605
714
  self.goNativeArgs = argsNew;
606
- EngineWrapper.faceEngineClose()
607
- let fmInit = EngineWrapper.isEngineInit()
608
- if !fmInit{
609
- EngineWrapper.faceEngineInit()
610
- }
715
+ self.faceLicenseInit()
716
+ // EngineWrapper.faceEngineClose()
717
+ // let fmInit = EngineWrapper.isEngineInit()
718
+ // if !fmInit{
719
+ // EngineWrapper.faceEngineInit()
720
+ // }
611
721
  let fmValue = EngineWrapper.getEngineInitValue() //get engineWrapper load status
612
722
  if fmValue == -20{
613
723
  self.sendError(msg: "Key not found")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "accurascan_kyc",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
4
4
  "description": "Accura Scan",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -156,5 +156,6 @@
156
156
  }
157
157
  ]
158
158
  ]
159
- }
159
+ },
160
+ "dependencies": {}
160
161
  }