React Native On-Device Barcode Scanning w/ Google ML Kit
npm install @react-native-ml-kit/barcode-scanning --save
CLI autolink feature links the module while building the app.
react-native link @react-native-ml-kit/barcode-scanning
On iOS, use CocoaPods to add the native RNMLKitBarcodeScanning to your project:
npx pod-install
import BarcodeScanning from '@react-native-ml-kit/barcode-scanning';
const barcodes = await BarcodeScanning.scan(imageURL);
for (let barcode of barcodes) {
console.log(barcode.value, barcode.format);
}