Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions app/ios/LiveMRZScannerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@ struct LiveMRZScannerView: View {

func singleCorrectDocumentNumberInMRZ(result: String, docNumber: String, parser: QKMRZParser) -> QKMRZResult? {
let replacements: [Character: [Character]] = [
"0": ["O"], "O": ["0"],
"1": ["I"], "I": ["1"],
"2": ["Z"], "Z": ["2"],
"8": ["B"], "B": ["8"]
// "0": ["O", "D"],
// "1": ["I"],
"O": ["0"],
"D": ["0"],
"I": ["1"],
"L": ["1"],
"S": ["5"],
"G": ["6"],
// "2": ["Z"], "Z": ["2"],
// "8": ["B"], "B": ["8"]
]
let lines = result.components(separatedBy: "\n")
guard lines.count >= 2 else { return nil }
Expand Down Expand Up @@ -109,7 +115,7 @@ struct LiveMRZScannerView: View {

VStack {
if !scanComplete {
Text("Position the camera 30-40cm away from the passport for best results")
Text("Align the animation with the MRZ on the passport.")
.font(.footnote)
.padding()
.background(Color.black.opacity(0.7))
Expand Down