Having trouble with a vanilla C#/.NET/MAUI app that uses Camera.MAUI to detect PDF417 barcodes on iOS. I can detect simple codes like this, but no luck with the denser barcodes on driver licenses.
My setup for the cameraView (Camera.MAUI.CameraView) in the ContentPage is:
public MainPage()
{
InitializeComponent();
cameraView.CamerasLoaded += CameraView_CamerasLoaded;
cameraView.BarcodeDetected += CameraView_BarcodeDetected;
cameraView.BarCodeOptions = new Camera.MAUI.ZXingHelper.BarcodeDecodeOptions
{
AutoRotate = true,
PossibleFormats = {ZXing.BarcodeFormat.PDF_417},
ReadMultipleCodes = false,
TryHarder = true,
TryInverted = true
};
cameraView.BarCodeDetectionFrameRate = 10;
cameraView.BarCodeDetectionMaxThreads = 5;
cameraView.ControlBarcodeResultDuplicate = true;
cameraView.BarCodeDetectionEnabled = true;
}
CameraView_BarcodeDetected simply presents an alert when a barcode is detected. It fires for simple barcodes, but never for the barcodes found on US driver licenses.
I suspect the answer lies in using different value for BarCodeDetectionFrameRate and BarCodeDetectionMaxThreads, but haven't found the special mix yet in testing on several different iPhone 14 devices. Has anyone else been able to detect driver license barcodes on iOS using Camera.MAUI?