diff --git a/ios/Classes/BarcodeScanPlugin.m b/ios/Classes/BarcodeScanPlugin.m index 0786757..012593c 100644 --- a/ios/Classes/BarcodeScanPlugin.m +++ b/ios/Classes/BarcodeScanPlugin.m @@ -32,7 +32,7 @@ } } -- (void)barcodeScannerViewController:(BarcodeScannerViewController *)controller didScanBarcodeWithErrorCode:(NSString *)errorCode { +- (void)barcodeScannerViewController:(BarcodeScannerViewController *)controller didFailWithErrorCode:(NSString *)errorCode { if (self.result){ self.result([FlutterError errorWithCode:errorCode message:nil diff --git a/ios/Classes/BarcodeScannerViewController.m b/ios/Classes/BarcodeScannerViewController.m index 0835aaf..3ca4745 100644 --- a/ios/Classes/BarcodeScannerViewController.m +++ b/ios/Classes/BarcodeScannerViewController.m @@ -38,7 +38,7 @@ if (success) { [self startScan]; } else { - [self.delegate barcodeScannerViewController:self didScanBarcodeWithErrorCode:@"PERMISSION_NOT_GRANTED"]; + [self.delegate barcodeScannerViewController:self didFailWithErrorCode:@"PERMISSION_NOT_GRANTED"]; [self dismissViewControllerAnimated:NO completion:nil]; } }]; diff --git a/ios/Classes/BarcodeScannerViewControllerDelegate.h b/ios/Classes/BarcodeScannerViewControllerDelegate.h index 1412686..10290a3 100644 --- a/ios/Classes/BarcodeScannerViewControllerDelegate.h +++ b/ios/Classes/BarcodeScannerViewControllerDelegate.h @@ -9,6 +9,6 @@ @protocol BarcodeScannerViewControllerDelegate - (void)barcodeScannerViewController:(BarcodeScannerViewController *)controller didScanBarcodeWithResult:(NSString *)result; -- (void)barcodeScannerViewController:(BarcodeScannerViewController *)controller didScanBarcodeWithErrorCode:(NSString *)errorCode; +- (void)barcodeScannerViewController:(BarcodeScannerViewController *)controller didFailWithErrorCode:(NSString *)errorCode; @end