capacitor-community / barcode-scanner

A fast and efficient (QR) barcode scanner for Capacitor
MIT License
437 stars 168 forks source link

UPC_A on ios platform #242

Open ivakm opened 1 year ago

ivakm commented 1 year ago

Barcode format UPC_A for the ios platform does not work correctly. I'm expecting a 12-digit number, but I'm getting a 13-digit number. For example I have a barcode sticker like 001234567890 but the plugin gives me 0001234567890 with EAN_13 format and it could be a problem because I could have another item with such number. So how can I be sure that the scanned format is EAT_13 and not reworked UPC_A?

thegnuu commented 1 year ago

There is not much I can do, we are not responsible for the plugins which decode the barcodes. One possible solution would be only to allow the scanning of UPC_A, another one would be to test the new implementation of v5.0.0-beta.x that uses ml-kit.

Unfortunately, I have no idea what version you are using on which OS and how the code you want to scan looks, so I can't test this. The ml-kit version will soon replace the old implementation anyways, so it might be a good idea to use this and try it with the new implementation.