Description
Minimal reproducible example
https://github.com/steveliles/expo-barcode-scanning-bug/blob/main/App.js
Summary
Steps to reproduce:
- run the app in the repro repository with
expo run ios --device
and pick a real device with a camera - scan an ean13 barcode
- notice that the type is reported as "org.gs1.EAN-13"
- now run the app in with
expo run android --device
and pick a real device with a camera - scan an ean13 barcode
- notice that the type is reported as 32 (the number, not a string)
I have two issues:
- When we configure the scanner we use "ean13", but the type is reported on iOS as "org.gs1.EAN-13". Its ok I guess, but a bit surprising that the type in the result does not match the type in the config, and there should probably be a list somewhere of what these result types will be (or perhaps constants to match against)?
- Android is returning numbers instead of strings, inconsistent with iOS and quite opaque.
Environment
expo-env-info 1.2.0 environment info:
System:
OS: macOS 14.2.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.14.1 - ~/.nvm/versions/node/v18.14.1/bin/node
npm: 9.3.1 - ~/.nvm/versions/node/v18.14.1/bin/npm
Watchman: 2023.11.27.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 23.2, iOS 17.2, macOS 14.2, tvOS 17.2, visionOS 1.0, watchOS 10.2
Android SDK:
Android NDK: 19.0.5232133
IDEs:
Android Studio: 3.3 AI-182.5107.16.33.5199772
Xcode: 15.2/15C500b - /usr/bin/xcodebuild
npmPackages:
expo: ~50.0.6 => 50.0.6
react: 18.2.0 => 18.2.0
react-native: 0.73.2 => 0.73.2
npmGlobalPackages:
eas-cli: 7.1.1
Expo Workflow: bare
Activity