Redth / ZXing.Net.Mobile

Barcode Scanner for Xamarin.iOS, Xamarin.Android, UWP and Tizen
MIT License
1.07k stars 703 forks source link

iOS Scanning does not work properly #676

Closed Axemasta closed 6 years ago

Axemasta commented 6 years ago

I am have encountered this error in a personal app however all the issues I have experienced are present in the ZXing Sample App, available on here.

Performance Firstly the performance of the barcode scanner is extremely poor (iOS only). Even if the camera is in focus, the barcode will not get scanned. I downloaded Apples barcode demo app that uses AVFoundation and that worked flawlessly, recognising barcodes off the bat. I even held the phone whilst using ZXing in a position where the barcode was not recognised & switched to Apples app... which recognised the code straight away.

There are other issues I have noticed, the isAnalysing property seems to be ignored. In my own sample app if I point my phone at a barcode (and it recognises it), the first line of code it hits is: zxing.IsAnalyzing = false; however if you hold the phone up, it will keep adding alert controllers because it continues to analyse.

Is this framework up to the task of barcode scanning for commerical apps using Xamarin Forms? this seems to be a well recommended solution however the iOS version doesnt currently seem to work at all! (the same code runs on android, and it runs well!....)

I have tested this on iPhone 6, SE & 7 (all latest updates)

ghost commented 6 years ago

I have the same problem.

Twillen commented 6 years ago

I was having a similar issue on iOS. What I noticed, and seemed to work for me was reducing the DelayBetweenAnalyzingFrames. It seemed like to me while the analyzing was temporarily turned off due to the delay, iOS would also delay focusing of the camera. This would would make it very time consuming to get the app to recognize a barcode.

Axemasta commented 6 years ago

Appears to be working on 2.4.1