Skip to content

Commit 2c73c8b

Browse files
committed
Fixing build on simulator
1 parent 0568b94 commit 2c73c8b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

Sources/CodeScanner/ScannerViewController.swift

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,11 @@ extension CodeScannerView {
119119
}
120120

121121
override public func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
122-
guard let simulatedData = delegate?.parent.simulatedData else {
123-
print("Simulated Data Not Provided!")
124-
return
125-
}
126-
127122
// Send back their simulated data, as if it was one of the types they were scanning for
128-
let result = ScanResult(string: simulatedData, type: delegate?.parent.codeTypes.first ?? .qr)
129-
delegate?.found(result)
123+
found(ScanResult(
124+
string: parentView.simulatedData,
125+
type: parentView.codeTypes.first ?? .qr
126+
))
130127
}
131128

132129
#else

0 commit comments

Comments
 (0)