We’re working with a merchant that’s having issues with the Scanner API. The problem is that the Scanner API is returning incorrect data from a PDF417 barcode on their iPad Pro running Shopify POS and our POS Extension.
We worked with them to troubleshoot the issue, they have the latest version of the Shopify POS app (9.30.2) and the latest version of iOS (18.3.2) on an iPad Pro.
We record the raw data from the Scanner API and can definitely confirm that the data scanned from the barcode is incomplete, only showing a 13 digit number instead of the complete embedded text.
We tested on our own iPad Air (5th generation) with the same exact software versions for the Shopify POS app, iOS version and our extension - but we were not able to recreate the problem.
Additionally, the merchant tested on a different iPad device that’s on iOS v15, and the Scanner API worked as expected.
In all cases, the iPad’s embedded camera is used, not a handheld scanner.
We’re asking for the exact iPad model from the merchant, and will share once we have it.
@Dylan Not that I know of, this is the first report that I’ve run into. Could you please provide the iPad model once you have it? This could be handy in finding more information.
Unfortunately getting even that detail from merchants is difficult, I’ve shared step by step screenshots on how to find it but haven’t heard word back.
Another case has popped up with other store. Is there any other information I can share? Is there a UUID I can somehow retrieve from the Scanner API for a specific scan?
Guy was using POS Go barcode scanner which worked fine, but was trying to use iOS device and that was never scanning. His barcodes we correct and matched Shopify.
I added some logging and discovered the iPhone was always prefixing the barcode with a 0.
After much digging
A UPC-A symbol that is created in the United States can be transformed into an EAN-13 symbol by prefixing it with a zero.
@Dylan Thank you for your patience and additional information on the issue at hand. I have never run into this issue myself but I’ve sent out a question to the device team to see if they know anything more. I’ll keep you updated if anything comes up.
The Shopify staffer that I also spoke with had this issue with his MN issued drivers license as well.
I have noticed that both NV and MN licenses feature two barcodes, I wonder if the scanner is picking up the smaller one instead of the primary PDF417 barcode.
Thanks for confirming, @Dylan. It seems the camera scanner is working as expected, but it’s prioritizing the smaller barcode instead of the PDF417 barcode.
This aligns with your previous statement:
“I have noticed that both NV and MN licenses feature two barcodes. I wonder if the scanner is picking up the smaller one instead of the primary PDF417 barcode.”
In the short term, I recommend advising merchants to ensure only one barcode is visible within the camera view at any given time. Additionally, if your implementation allows, adjusting or reducing the size of the camera view could help merchants more easily frame a single barcode, minimizing the chance of multiple barcodes being scanned simultaneously.
In the long term, while we can’t promise specific changes at this time, we understand the importance of this use case and will keep it in consideration as we evaluate future improvements to the scanning API.
Additionally, if your implementation allows, adjusting or reducing the size of the camera view could help merchants more easily frame a single barcode, minimizing the chance of multiple barcodes being scanned simultaneously.
The Scanner API doesn’t allow any customization of the camera zoom/panning etc as far as I’m aware.
Are you referring to some other API or setting that’s outside of the extension’s code?
In the long term, while we can’t promise specific changes at this time, we understand the importance of this use case and will keep it in consideration as we evaluate future improvements to the scanning API.
Alternatively please consider supporting a camera API with direct access to the camera’s feed.
Then we can apply our own logic to ignore the secondary barcode.
Can you check the scan data on the subscription in POS?
I’ve had to do this because one of my customers has a URL barcode next to the normal one, so I check the data doesn’t contain https:// otherwise try look it up.
Not sure if theres a regex or something you could use for your use case?