Skip to content

Commit

Permalink
Fixing build on simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanfallet committed Aug 29, 2022
1 parent 0568b94 commit 2c73c8b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Sources/CodeScanner/ScannerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,11 @@ extension CodeScannerView {
}

override public func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
guard let simulatedData = delegate?.parent.simulatedData else {
print("Simulated Data Not Provided!")
return
}

// Send back their simulated data, as if it was one of the types they were scanning for
let result = ScanResult(string: simulatedData, type: delegate?.parent.codeTypes.first ?? .qr)
delegate?.found(result)
found(ScanResult(
string: parentView.simulatedData,
type: parentView.codeTypes.first ?? .qr
))
}

#else
Expand Down

0 comments on commit 2c73c8b

Please sign in to comment.