We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 57cdc44 + b8b975a commit a147b22Copy full SHA for a147b22
Sources/CodeScanner/ScannerViewController.swift
@@ -64,15 +64,16 @@ extension CodeScannerView {
64
let features = detector.features(in: ciImage)
65
66
for feature in features as! [CIQRCodeFeature] {
67
- qrCodeLink += feature.messageString!
68
- }
+ qrCodeLink = feature.messageString!
+ if qrCodeLink == "" {
69
+ didFail(reason: .badOutput)
70
+ } else {
71
+ let result = ScanResult(string: qrCodeLink, type: .qr, image: qrcodeImg)
72
+ found(result)
73
+ }
74
- if qrCodeLink == "" {
- didFail(reason: .badOutput)
- } else {
- let result = ScanResult(string: qrCodeLink, type: .qr, image: qrcodeImg)
- found(result)
75
}
76
+
77
} else {
78
print("Something went wrong")
79
0 commit comments