accurascan_kyc 1.2.5 → 1.2.7

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,7 @@ 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","4.0.4"
25
+ s.dependency "AccuraKYC_Sim","4.0.5"
26
26
  # Don't install the dependencies when we run `pod install` in the old architecture.
27
27
  if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
28
28
  s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
@@ -100,7 +100,7 @@ dependencies {
100
100
  implementation 'androidx.appcompat:appcompat:1.6.0'
101
101
  implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
102
102
  // For Accura OCR SDK
103
- implementation 'com.github.accurascan:AccuraOCR:5.5.0'
103
+ implementation 'com.github.accurascan:AccuraOCR:6.1.3'
104
104
  // For Accura Face match
105
105
  implementation 'com.github.accurascan:AccuraFaceMatch:3.2.2'
106
106
  // for liveness
@@ -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=""
@@ -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=""
@@ -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,6 +129,19 @@ 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) {
@@ -200,6 +216,93 @@ class AccurascanKyc: NSObject {
200
216
  }
201
217
  }
202
218
 
219
+ @objc(getDynamicMetaData:callback:)
220
+ func getDynamicMetaData(_ argsNew: NSArray, _ callback: @escaping RCTResponseSenderBlock) {
221
+ goNativeArgs = argsNew
222
+ goNativeCallBack = callback
223
+ isDynamic = true
224
+ var results:[String: Any] = [:]
225
+ results["isValid"] = false
226
+
227
+ guard let configs = goNativeArgs[0] as? [String: Any] else {
228
+ // print("Invalid argument format")
229
+ results["status"] = "Invalid argument format"
230
+ self.goNativeCallBack?([ AccurascanKyc.convertJSONString(results: results),NSNull()])
231
+ return
232
+ }
233
+ LicenseAbsoultPath = configs["licensePath"] as! String
234
+ FaceLicenseAbsoultPath = configs["faceLicensePath"] as! String
235
+
236
+ accuraCameraWrapper = AccuraCameraWrapper.init()
237
+ // DispatchQueue.main.async {
238
+ // self.accuraCameraWrapper?.setDefaultDialogs(true)
239
+ // self.accuraCameraWrapper?.showLogFile(true) // Set true to print log from KYC SDK
240
+ // }
241
+
242
+ DispatchQueue.main.async {
243
+ self.viewController = RCTPresentedViewController()!
244
+ self.viewControllerWindow = RCTKeyWindow()!
245
+ let sdkModel = self.accuraCameraWrapper!.loadEngine(self.LicenseAbsoultPath, documentDirectory: NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0] as String)
246
+
247
+
248
+
249
+ if sdkModel!.i > 0 {
250
+ var countries:[Any] = []
251
+ results["sdk_version"] = ""
252
+ results["isValid"] = true
253
+ results["isOCR"] = sdkModel!.isOCREnable
254
+ results["isOCREnable"] = sdkModel!.isOCREnable
255
+ results["isBarcode"] = sdkModel!.isBarcodeEnable
256
+ results["isBankCard"] = sdkModel!.isBankCardEnable
257
+ results["isMRZ"] = sdkModel!.isMRZEnable
258
+
259
+
260
+ let countryListStr = self.accuraCameraWrapper!.getOCRList();
261
+ for item in countryListStr ?? [] {
262
+ let cntry = item as! NSDictionary
263
+ var country:[String: Any] = [:]
264
+ // if cntry.value(forKey: "country_name") as? String == "Saint Kitts and Nevis" {
265
+ // results["isSchengen"] = true
266
+ // }else{
267
+ country["name"] = cntry.value(forKey: "country_name")
268
+ country["id"] = cntry.value(forKey: "country_id")
269
+ var cards:[[String: Any]] = []
270
+ for cd in cntry.value(forKey: "cards") as! NSArray {
271
+ let cardF = cd as! NSDictionary
272
+ var card:[String: Any] = [:]
273
+ card["name"] = cardF.value(forKey:"card_name")
274
+ card["id"] = cardF.value(forKey:"card_id")
275
+ card["type"] = cardF.value(forKey:"card_type")
276
+ cards.append(card)
277
+ }
278
+ country["cards"] = cards
279
+ countries.append(country)
280
+ // }
281
+ }
282
+ results["countries"] = countries
283
+ if sdkModel!.isBarcodeEnable {
284
+ var barcodes:[[String: String]] = []
285
+ barcodes.append(["name": "ALL FORMATS","type": "ALL FORMATS"])
286
+ barcodes.append(["name": "EAN-8", "type": "EAN-8"])
287
+ barcodes.append(["name": "EAN-13", "type": "EAN-13"])
288
+ barcodes.append(["name": "PDF417", "type": "PDF417"])
289
+ barcodes.append(["name": "AZTEC", "type": "AZTEC"])
290
+ barcodes.append(["name": "CODE 128", "type": "CODE 128"])
291
+ barcodes.append(["name": "CODE 39", "type": "CODE 39"])
292
+ barcodes.append(["name": "CODE 93", "type": "CODE 93"])
293
+ barcodes.append(["name": "DATA MATRIX", "type": "DATA MATRIX"])
294
+ barcodes.append(["name": "QR CODE", "type": "QR CODE"])
295
+ barcodes.append(["name": "UPC-E", "type": "UPC-E"])
296
+ barcodes.append(["name": "UPC-A", "type": "UPC-A"])
297
+ barcodes.append(["name": "CODABAR", "type": "CODABAR"])
298
+ results["barcodes"] = barcodes
299
+ }
300
+ }
301
+ self.goNativeCallBack!([NSNull(), AccurascanKyc.convertJSONString(results: results)])
302
+ // }
303
+ }
304
+ }
305
+
203
306
  @objc(startOcrWithCard:callback:)
204
307
  func startOcrWithCard(_ argsNew: NSArray, callback: @escaping RCTResponseSenderBlock){
205
308
  lvfm.faceImage = nil
@@ -395,13 +498,14 @@ class AccurascanKyc: NSObject {
395
498
  self.goNativeArgs = argsNew;
396
499
  let face:NSDictionary
397
500
  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
- }
501
+ faceLicenseInit()
502
+ // EngineWrapper.faceEngineClose()
503
+ // let fmInit = EngineWrapper.isEngineInit()
504
+ // if !fmInit{
505
+ // DispatchQueue.main.async {
506
+ // EngineWrapper.faceEngineInit()
507
+ // }
508
+ // }
405
509
  let fmValue = EngineWrapper.getEngineInitValue() //get engineWrapper load status
406
510
  if fmValue == -20{
407
511
  self.goNativeCallBack!(["key not found", NSNull()])
@@ -433,11 +537,12 @@ class AccurascanKyc: NSObject {
433
537
  self.goNativeArgs = argsNew;
434
538
  let face:NSDictionary
435
539
  face = self.goNativeArgs[0] as! NSDictionary
436
- EngineWrapper.faceEngineClose()
437
- let fmInit = EngineWrapper.isEngineInit()
438
- if !fmInit{
439
- EngineWrapper.faceEngineInit()
440
- }
540
+ self.faceLicenseInit()
541
+ // EngineWrapper.faceEngineClose()
542
+ // let fmInit = EngineWrapper.isEngineInit()
543
+ // if !fmInit{
544
+ // EngineWrapper.faceEngineInit()
545
+ // }
441
546
  let fmValue = EngineWrapper.getEngineInitValue() //get engineWrapper load status
442
547
  if fmValue == -20{
443
548
  self.goNativeCallBack!(["key not found", NSNull()])
@@ -467,11 +572,12 @@ class AccurascanKyc: NSObject {
467
572
  DispatchQueue.main.async {
468
573
  self.goNativeCallBack = callback;
469
574
  self.goNativeArgs = argsNew;
470
- EngineWrapper.faceEngineClose()
471
- let fmInit = EngineWrapper.isEngineInit()
472
- if !fmInit{
473
- EngineWrapper.faceEngineInit()
474
- }
575
+ self.faceLicenseInit()
576
+ // EngineWrapper.faceEngineClose()
577
+ // let fmInit = EngineWrapper.isEngineInit()
578
+ // if !fmInit{
579
+ // EngineWrapper.faceEngineInit()
580
+ // }
475
581
  let fmValue = EngineWrapper.getEngineInitValue() //get engineWrapper load status
476
582
  if fmValue == -20{
477
583
  self.sendError(msg: "Key not found")
@@ -514,11 +620,12 @@ class AccurascanKyc: NSObject {
514
620
  DispatchQueue.main.async {
515
621
  self.goNativeCallBack = callback;
516
622
  self.goNativeArgs = argsNew;
517
- EngineWrapper.faceEngineClose()
518
- let fmInit = EngineWrapper.isEngineInit()
519
- if !fmInit{
520
- EngineWrapper.faceEngineInit()
521
- }
623
+ self.faceLicenseInit()
624
+ // EngineWrapper.faceEngineClose()
625
+ // let fmInit = EngineWrapper.isEngineInit()
626
+ // if !fmInit{
627
+ // EngineWrapper.faceEngineInit()
628
+ // }
522
629
  let fmValue = EngineWrapper.getEngineInitValue() //get engineWrapper load status
523
630
  if fmValue == -20{
524
631
  self.sendError(msg: "Key not found")
@@ -557,13 +664,14 @@ class AccurascanKyc: NSObject {
557
664
  DispatchQueue.main.async {
558
665
  self.goNativeCallBack = callback;
559
666
  self.goNativeArgs = argsNew;
560
- EngineWrapper.faceEngineClose()
561
- let fmInit = EngineWrapper.isEngineInit()
562
- if !fmInit{
563
- DispatchQueue.main.async {
564
- EngineWrapper.faceEngineInit()
565
- }
566
- }
667
+ self.faceLicenseInit()
668
+ // EngineWrapper.faceEngineClose()
669
+ // let fmInit = EngineWrapper.isEngineInit()
670
+ // if !fmInit{
671
+ // DispatchQueue.main.async {
672
+ // EngineWrapper.faceEngineInit()
673
+ // }
674
+ // }
567
675
  let fmValue = EngineWrapper.getEngineInitValue() //get engineWrapper load status
568
676
  if fmValue == -20{
569
677
  // goNativeCallBack!(FlutterError.init(code: "101", message: "Key not found", details: nil))
@@ -603,11 +711,12 @@ class AccurascanKyc: NSObject {
603
711
  DispatchQueue.main.async {
604
712
  self.goNativeCallBack = callback;
605
713
  self.goNativeArgs = argsNew;
606
- EngineWrapper.faceEngineClose()
607
- let fmInit = EngineWrapper.isEngineInit()
608
- if !fmInit{
609
- EngineWrapper.faceEngineInit()
610
- }
714
+ self.faceLicenseInit()
715
+ // EngineWrapper.faceEngineClose()
716
+ // let fmInit = EngineWrapper.isEngineInit()
717
+ // if !fmInit{
718
+ // EngineWrapper.faceEngineInit()
719
+ // }
611
720
  let fmValue = EngineWrapper.getEngineInitValue() //get engineWrapper load status
612
721
  if fmValue == -20{
613
722
  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.5",
3
+ "version": "1.2.7",
4
4
  "description": "Accura Scan",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",