react-native-vision-camera
react-native-vision-camera copied to clipboard
Add UPC-A support
What
This PR adds support for UPC-A barcode format.
Changes
This PR adds the UPC-A type format to React Native, CodeType to Android and iOS, but points to EAN13 in iOS as Apple states it supports UPC-A through EAN13 here.
Tested on
Samsung S22 iPhone X
Related issues
Fixes #2118
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
react-native-vision-camera | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Mar 12, 2024 3:54pm |
I made these code changes to my app months ago, didn't test this specific PR yet can confirm by tomorrow on the 2 devices stated in the PR.
Also, why is this PR still a Draft?
I forgot to undraft it.
@mrousavy Do you think it would be worth adding a middle layer where if iOS asked for ean vs upc_a we do the conversion for them?
@mrousavy Do you think it would be worth adding a middle layer where if iOS asked for ean vs upc_a we do the conversion for them?
no.
I'm thinking whether it would be better to make upc-a
Android only, so it's the users job to explicitly use ean-13
on iOS instead - then there'd be no confusion once the user read the docs....
Can we also then add that iOS supports upc-a
through ean-13
but they user will need to manually handle that case. Just so people know, might prevent future tickets being opened.
I've added some documentation on this issue at the bottom of the CodeScanning doc.
I've made the adjustments
Cool, thanks for your PR I think with the docs this makes sense.
If the PR goes green we can merge! :)
@mrousavy is this all good to merge?
Ah, thanks for the ping, yes - LGTM - thank you for your contribution! ❤️
Hey @mrousavy Any plans to release a version update with UPC-A any time soon?
Hey - I think this is released in V4 beta!