accurascan_kyc 1.0.3 → 1.0.4
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/ios/AccurascanKyc.swift +1 -1
- package/ios/ViewController.swift +42 -42
- package/package.json +1 -1
package/ios/AccurascanKyc.swift
CHANGED
|
@@ -555,7 +555,7 @@ class AccurascanKyc: NSObject {
|
|
|
555
555
|
static func convertJSONString(results: [String: Any]) -> String {
|
|
556
556
|
|
|
557
557
|
if let theJSONData = try? JSONSerialization.data( withJSONObject: results, options: .prettyPrinted ),
|
|
558
|
-
let theJSONText = String(data: theJSONData, encoding:
|
|
558
|
+
let theJSONText = String(data: theJSONData, encoding: .utf8) {
|
|
559
559
|
print("JSON string = \n\(theJSONText)")
|
|
560
560
|
return theJSONText.components(separatedBy: .newlines).joined();
|
|
561
561
|
}
|
package/ios/ViewController.swift
CHANGED
|
@@ -1876,7 +1876,8 @@ extension ViewController: VideoCameraWrapperDelegate {
|
|
|
1876
1876
|
}
|
|
1877
1877
|
}
|
|
1878
1878
|
}
|
|
1879
|
-
mrzData =
|
|
1879
|
+
mrzData = getMRZKeyValue()
|
|
1880
|
+
// mrzData = dD as! [String : Any] //self.getMRZKeyValue()
|
|
1880
1881
|
// mrzData["Other Id2"] = shareScanningListing["personalNumber2"]
|
|
1881
1882
|
// mrzData["Document Type"] = shareScanningListing["passportType"]
|
|
1882
1883
|
}
|
|
@@ -1903,7 +1904,8 @@ extension ViewController: VideoCameraWrapperDelegate {
|
|
|
1903
1904
|
|
|
1904
1905
|
}
|
|
1905
1906
|
}
|
|
1906
|
-
mrzData =
|
|
1907
|
+
mrzData = getMRZKeyValue()
|
|
1908
|
+
// mrzData = dD as! [String : Any] //self.getMRZKeyValue()
|
|
1907
1909
|
// mrzData["Other Id2"] = shareScanningListing["personalNumber2"]
|
|
1908
1910
|
// mrzData["Document Type"] = shareScanningListing["passportType"]
|
|
1909
1911
|
}
|
|
@@ -2165,7 +2167,8 @@ extension ViewController: VideoCameraWrapperDelegate {
|
|
|
2165
2167
|
}
|
|
2166
2168
|
}
|
|
2167
2169
|
print("\(shareScanningListing)")
|
|
2168
|
-
mrzData =
|
|
2170
|
+
mrzData = getMRZKeyValue()
|
|
2171
|
+
// mrzData = dD as! [String : String]//self.getMRZKeyValue()
|
|
2169
2172
|
results["mrz_data"] = mrzData
|
|
2170
2173
|
callBack!([NSNull(),AccurascanKyc.convertJSONString(results:results)])
|
|
2171
2174
|
self.dismiss(animated: true)
|
|
@@ -2478,7 +2481,7 @@ extension ViewController: VideoCameraWrapperDelegate {
|
|
|
2478
2481
|
print("\(shareScanningListing)")
|
|
2479
2482
|
if let line = shareScanningListing["lines"] as? String {
|
|
2480
2483
|
mrzData["MRZ"] = line
|
|
2481
|
-
|
|
2484
|
+
|
|
2482
2485
|
}
|
|
2483
2486
|
if let givenname = shareScanningListing["givenname"] as? String {
|
|
2484
2487
|
mrzData["First Name"] = givenname
|
|
@@ -2496,103 +2499,100 @@ extension ViewController: VideoCameraWrapperDelegate {
|
|
|
2496
2499
|
|
|
2497
2500
|
if let docnumber = shareScanningListing["passportNumber"] as? String {
|
|
2498
2501
|
mrzData["Document No."] = docnumber
|
|
2499
|
-
|
|
2502
|
+
|
|
2500
2503
|
} else if let docnumber = shareScanningListing["docNumber"] as? String {
|
|
2501
2504
|
mrzData["Document No."] = docnumber
|
|
2502
|
-
|
|
2505
|
+
|
|
2503
2506
|
}
|
|
2504
2507
|
if let documentType = shareScanningListing["passportType"] as? String {
|
|
2505
2508
|
mrzData["Document Type"] = documentType
|
|
2506
|
-
|
|
2509
|
+
|
|
2507
2510
|
} else if let docnumber = shareScanningListing["docNumber"] as? String {
|
|
2508
2511
|
mrzData["Document No."] = docnumber
|
|
2509
|
-
|
|
2512
|
+
|
|
2510
2513
|
}
|
|
2511
2514
|
|
|
2512
2515
|
if let docchecksum = shareScanningListing["docchecksum"] as? String {
|
|
2513
2516
|
mrzData["Document check No."] = docchecksum
|
|
2514
|
-
} else if let docchecksum = shareScanningListing["
|
|
2517
|
+
} else if let docchecksum = shareScanningListing["passportNumberChecksum"] as? String {
|
|
2515
2518
|
mrzData["Document check No."] = docchecksum
|
|
2516
2519
|
}
|
|
2517
2520
|
|
|
2518
2521
|
if let correctdocchecksum = shareScanningListing["correctdocchecksum"] as? String {
|
|
2519
2522
|
mrzData["Correct Document check No."] = correctdocchecksum
|
|
2520
|
-
|
|
2523
|
+
|
|
2521
2524
|
} else if let correctdocchecksum = shareScanningListing["correctPassportChecksum"] as? String {
|
|
2522
2525
|
mrzData["Correct Document check No."] = correctdocchecksum
|
|
2523
|
-
|
|
2526
|
+
|
|
2524
2527
|
}
|
|
2525
2528
|
if let contri = shareScanningListing["country"] as? String {
|
|
2526
2529
|
mrzData["Country"] = contri
|
|
2527
|
-
|
|
2530
|
+
|
|
2528
2531
|
}
|
|
2529
2532
|
if let nationality = shareScanningListing["nationality"] as? String {
|
|
2530
2533
|
mrzData["Nationality"] = nationality
|
|
2531
|
-
|
|
2534
|
+
|
|
2532
2535
|
}
|
|
2533
2536
|
if let birth = shareScanningListing["birth"] as? String {
|
|
2534
2537
|
mrzData["Date of Birth"] = date(toFormatedDate: birth)
|
|
2535
|
-
|
|
2538
|
+
|
|
2536
2539
|
}
|
|
2537
2540
|
if let birthchecksum = shareScanningListing["birthchecksum"] as? String {
|
|
2538
2541
|
mrzData["Birth Check No."] = birthchecksum
|
|
2539
|
-
|
|
2542
|
+
|
|
2540
2543
|
} else if let birthchecksum = shareScanningListing["BirthChecksum"] as? String {
|
|
2541
2544
|
mrzData["Birth Check No."] = birthchecksum
|
|
2542
|
-
|
|
2545
|
+
|
|
2543
2546
|
}
|
|
2544
2547
|
if let correctbirthchecksum = shareScanningListing["correctbirthchecksum"] as? String {
|
|
2545
2548
|
mrzData["Correct Birth Check No."] = correctbirthchecksum
|
|
2546
|
-
|
|
2549
|
+
|
|
2547
2550
|
} else if let correctbirthchecksum = shareScanningListing["correctBirthChecksum"] as? String {
|
|
2548
2551
|
mrzData["Correct Birth Check No."] = correctbirthchecksum
|
|
2549
|
-
|
|
2552
|
+
|
|
2550
2553
|
}
|
|
2551
|
-
if let expirationdate = shareScanningListing["
|
|
2552
|
-
mrzData["Date of Expiry"] = date(toFormatedDate: expirationdate)
|
|
2553
|
-
|
|
2554
|
-
} else if let expirationdate = shareScanningListing["expirationDate"] as? String {
|
|
2554
|
+
if let expirationdate = shareScanningListing["expirationDate"] as? String {
|
|
2555
2555
|
mrzData["Date of Expiry"] = date(toFormatedDate: expirationdate)
|
|
2556
|
-
|
|
2556
|
+
|
|
2557
2557
|
}
|
|
2558
2558
|
if let expirationchecksum = shareScanningListing["expirationchecksum"] as? String {
|
|
2559
2559
|
mrzData["Expiration Check No."] = expirationchecksum
|
|
2560
|
-
|
|
2561
|
-
} else if let expirationchecksum = shareScanningListing["
|
|
2560
|
+
|
|
2561
|
+
} else if let expirationchecksum = shareScanningListing["expirationDateChecksum"] as? String {
|
|
2562
2562
|
mrzData["Expiration Check No."] = expirationchecksum
|
|
2563
|
-
|
|
2563
|
+
|
|
2564
2564
|
}
|
|
2565
2565
|
if let correctexpirationchecksum = shareScanningListing["correctexpirationchecksum"] as? String {
|
|
2566
2566
|
mrzData["Correct Expiration Check No."] = correctexpirationchecksum
|
|
2567
|
-
|
|
2567
|
+
|
|
2568
2568
|
} else if let correctexpirationchecksum = shareScanningListing["correctExpirationChecksum"] as? String {
|
|
2569
2569
|
mrzData["Correct Expiration Check No."] = correctexpirationchecksum
|
|
2570
|
-
|
|
2570
|
+
|
|
2571
2571
|
}
|
|
2572
2572
|
if let issuedate = shareScanningListing["issuedate"] as? String {
|
|
2573
2573
|
mrzData["Date Of Issue"] = date(toFormatedDate: issuedate)
|
|
2574
|
-
|
|
2574
|
+
|
|
2575
2575
|
} else if let issuedate = shareScanningListing["issueDate"] as? String {
|
|
2576
2576
|
mrzData["Date Of Issue"] = date(toFormatedDate: issuedate)
|
|
2577
|
-
|
|
2577
|
+
|
|
2578
2578
|
}
|
|
2579
2579
|
if let departmentnumber = shareScanningListing["departmentnumber"] as? String {
|
|
2580
2580
|
mrzData["Department No."] = departmentnumber
|
|
2581
|
-
|
|
2581
|
+
|
|
2582
2582
|
}else if let departmentnumber = shareScanningListing["departmentNumber"] as? String {
|
|
2583
2583
|
mrzData["Department No."] = departmentnumber
|
|
2584
|
-
|
|
2584
|
+
|
|
2585
2585
|
}
|
|
2586
2586
|
if let otherid = shareScanningListing["otherid"] as? String {
|
|
2587
2587
|
mrzData["Other ID"] = otherid
|
|
2588
|
-
|
|
2588
|
+
|
|
2589
2589
|
} else if let otherid = shareScanningListing["personalNumber"] as? String {
|
|
2590
2590
|
mrzData["Other ID"] = otherid
|
|
2591
|
-
|
|
2591
|
+
|
|
2592
2592
|
}
|
|
2593
2593
|
if let otherid = shareScanningListing["otherid"] as? String {
|
|
2594
2594
|
mrzData["Other ID2"] = otherid
|
|
2595
|
-
|
|
2595
|
+
|
|
2596
2596
|
} else if let otherid = shareScanningListing["personalNumber2"] as? String {
|
|
2597
2597
|
if otherid != "" {
|
|
2598
2598
|
mrzData["Other ID2"] = otherid
|
|
@@ -2602,24 +2602,24 @@ extension ViewController: VideoCameraWrapperDelegate {
|
|
|
2602
2602
|
|
|
2603
2603
|
if let otheridchecksum = shareScanningListing["personalNumberChecksum"] as? String {
|
|
2604
2604
|
mrzData["Other ID Check"] = otheridchecksum
|
|
2605
|
-
|
|
2605
|
+
|
|
2606
2606
|
} else if let otheridchecksum = shareScanningListing["otherIdChecksum"] as? String {
|
|
2607
2607
|
mrzData["Other ID Check"] = otheridchecksum
|
|
2608
|
-
|
|
2608
|
+
|
|
2609
2609
|
}
|
|
2610
2610
|
if let secondrowchecksum = shareScanningListing["secondrowchecksum"] as? String {
|
|
2611
2611
|
mrzData["Second Row Check No."] = secondrowchecksum
|
|
2612
|
-
|
|
2612
|
+
|
|
2613
2613
|
} else if let secondrowchecksum = shareScanningListing["secondRowChecksum"] as? String {
|
|
2614
2614
|
mrzData["Second Row Check No."] = secondrowchecksum
|
|
2615
|
-
|
|
2615
|
+
|
|
2616
2616
|
}
|
|
2617
2617
|
if let correctsecondrowchecksum = shareScanningListing["correctsecondrowchecksum"] as? String {
|
|
2618
2618
|
mrzData["Correct Second Row Check No."] = correctsecondrowchecksum
|
|
2619
|
-
|
|
2619
|
+
|
|
2620
2620
|
} else if let correctsecondrowchecksum = shareScanningListing["correctSecondrowChecksum"] as? String {
|
|
2621
2621
|
mrzData["Correct Second Row Check No."] = correctsecondrowchecksum
|
|
2622
|
-
|
|
2622
|
+
|
|
2623
2623
|
}
|
|
2624
2624
|
mrzData["sex"] = ""
|
|
2625
2625
|
if let sx = shareScanningListing["sex"] as? String {
|
|
@@ -2633,7 +2633,7 @@ extension ViewController: VideoCameraWrapperDelegate {
|
|
|
2633
2633
|
mrzData["sex"] = sx
|
|
2634
2634
|
}
|
|
2635
2635
|
}
|
|
2636
|
-
|
|
2636
|
+
|
|
2637
2637
|
return mrzData
|
|
2638
2638
|
}
|
|
2639
2639
|
|