Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

barCodeTypes error on iOS #652

Closed
letops opened this issue Mar 30, 2017 · 3 comments
Closed

barCodeTypes error on iOS #652

letops opened this issue Mar 30, 2017 · 3 comments

Comments

@letops
Copy link

letops commented Mar 30, 2017

Expected behaviour

We should only have to set an array with the barcode types that we wish to detect, as the documentation explains: [ 'aztec', 'code128', ...etc ]

Actual behaviour

This is not respected by iOS. In iOS you need to set the barcode types in a different manner, e.g. [ 'org.iso.Aztec', 'org.iso.Code128', ...etc ], if you don't the app freezes and crashes.

Environment

  • React Native version: 0.41.2
  • React Native platform + platform version: iOS 10.3

Some other findings

On ANDROID only:

    barCodeTypes = {[
      'aztec',
      'codabar',  // Not in the docs, but found in code
      'code128',
      'code39',
      // 'code39mod43',  // Found in the docs but not in the code
      'code93',
      'datamatrix',  // When available(?), according to the docs
      'ean13',
      'ean8',
      'interleaved2of5',  // When available(?), according to the docs
      // 'itf14',  // When available(?), according to the docs, but not found in code
      'maxicode',  // Not in the docs, but found in code
      'pdf417',
      'qr',
      'rss14',  // Not in the docs, but found in code
      'rssexpanded',  // Not in the docs, but found in code
      'upca',
      'upce',
      'upceanextension',
    ]

On IOS only: (#613 is the only place where this is commented)

    barCodeTypes = {[
        'org.iso.Aztec',
        'org.iso.Code128',
        // 'code138' should be here, but not sure of the namespace (found in code)
        'org.iso.Code39',
        'org.iso.Code39Mod43',
        'com.intermec.Code93',
        // 'datamatrix' should be here, but not sure of the namespace (found in code)
        'org.gs1.EAN-13',
        'org.gs1.EAN-8',
        // 'interleaved2of5' should be here, but not sure of the namespace (found in code)
        // 'itf14' should be here, but not sure of the namespace (found in code)
        'org.iso.PDF417',
        'org.iso.QRCode',
        'org.gs1.UPC-E',
    ]}
@benvium
Copy link

benvium commented Nov 3, 2017

On iOS, the string to use for datamatrix is org.iso.DataMatrix (available since iOS8 https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypedatamatrixcode)

@niksajanjic
Copy link

Per documentation, this issue should've been resolved by using Camera.constants.barCodeType, but it doesn't work for me. See: #1206

@n1ru4l
Copy link
Collaborator

n1ru4l commented Dec 19, 2018

Please test it with the newest version of RNCamera and open a new issue if this error still occurs.

@n1ru4l n1ru4l closed this as completed Dec 19, 2018
@react-native-camera react-native-camera locked as resolved and limited conversation to collaborators Dec 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants