Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix mapping of itf and add new itf-14 type in iOS #3252

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

Regina-v
Copy link
Contributor

@Regina-v Regina-v commented Oct 19, 2024

What

I can't scan interleaved2of5 (ITF) barcodes in iOS.

Currently the CodeType itf is mapped:

ITF-14 is a variant of ITF with a fixed length of 14 characters. The problem is that the iOS AVMetadataObject.ObjectType.interleaved2of5 type is not mapped at all and therefore interleaved2of5 barcodes with a different length than 14 characters cannot be scanned in iOS.

Changes

Added and changed the mapping for iOS:

  • itf -> interleaved2of5
  • new itf-14 -> itf14 (iOS only)

Updated documentation about code types.

If you add now itf-14 unconditionally (i.e. don't exclude it for android) to the codeTypes array of the CodeScanner, in android it will (expectedly) throw the error "The given value for codeType could not be parsed! (Received: itf-14)".

Tested on

  • iPhone 12 mini, iOS 18.1
  • Google Pixel 7, Android 15

Related issues

Copy link

vercel bot commented Oct 19, 2024

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 Oct 19, 2024 6:18pm

@mrousavy
Copy link
Owner

Awesome!! Nice high quality PR, thanks for the fix and thanks for the explanation. LGTM! ❤️

@mrousavy mrousavy merged commit db99c08 into mrousavy:main Oct 29, 2024
10 checks passed
isaaccolson pushed a commit to isaaccolson/deliveries-mobile that referenced this pull request Oct 30, 2024
* fix links

* map itf to interleaved2of5 and add new itf-14 type for iOS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants