Skip to content

Commit

Permalink
Merge pull request #104 from hossinasaadi/main
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Fallet authored Mar 30, 2023
2 parents 57cdc44 + b8b975a commit a147b22
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Sources/CodeScanner/ScannerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,16 @@ extension CodeScannerView {
let features = detector.features(in: ciImage)

for feature in features as! [CIQRCodeFeature] {
qrCodeLink += feature.messageString!
}
qrCodeLink = feature.messageString!
if qrCodeLink == "" {
didFail(reason: .badOutput)
} else {
let result = ScanResult(string: qrCodeLink, type: .qr, image: qrcodeImg)
found(result)
}

if qrCodeLink == "" {
didFail(reason: .badOutput)
} else {
let result = ScanResult(string: qrCodeLink, type: .qr, image: qrcodeImg)
found(result)
}

} else {
print("Something went wrong")
}
Expand Down

0 comments on commit a147b22

Please sign in to comment.