BarcodeScanner icon indicating copy to clipboard operation
BarcodeScanner copied to clipboard

resetWithError not working

Open djimonn opened this issue 4 years ago • 0 comments

Hi,

I'm trying to use resetWithError() in my app, but it doesn't show an error (see video).

https://user-images.githubusercontent.com/50664914/128355802-83cc0f8f-d8ad-4bfd-8eff-d876ad345a2c.mov

Configuration of the viewController:

viewController metadata = [AVMetadataObject.ObjectType.ean13]
viewController.isOneTimeSearch = true
viewController.headerViewController.closeButton.isHidden = true
viewController.headerViewController.titleLabel.text = ""
viewController.codeDelegate = self
viewController.errorDelegate = self

Callbacks:

func scanner(_ controller: BarcodeScannerViewController, didCaptureCode code: String, type: String) {
        controller.resetWithError(message: "test error")
    }
func scanner(_ controller: BarcodeScannerViewController, didReceiveError error: Error) {
        controller.resetWithError(message: "Error")
    }

Am I doing something wrong?

djimonn avatar Aug 05 '21 13:08 djimonn