func barcodeScanner(_ scanner: BarcodeScannerViewController, read code: String) { print(code) scanner.dismiss(animated: true, completion: nil) } is being called 6 times on a single scan. Any way to resolve this?