This repository contains multiple samples that demonstrate how to use the Dynamsoft Barcode Reader React-Native Edition.
| Sample Name | Description | Build & Run |
|---|---|---|
| ScanBarcodes_ReadyToUseComponent | Demonstrates the quickest way to scan barcodes from live camera preview using the Ready-to-Use Barcode Scanner component, with minimal configuration required. | README |
| ScanBarcodes_FoundationalAPI | Demonstrates how to scan barcodes from live camera preview using the Foundational API, providing full control over camera, processing pipeline, and barcode results. | README |
| ScanDriversLicense_Expo | Demonstrates how to recognize and extract information from drivers’ licenses in real-time video streaming. | README |
| ScanVIN_Expo | Demonstrates how to recognize and extract information from VIN barcodes in real-time video streaming. | README |
| ScenarioOptimizedScanning_Expo | Demonstrates how to optimize scanning performance for different barcode formats and scenarios by loading scenario-specific templates (1D Retail, 1D Industrial, QR Code, Data Matrix, Aztec, Dot Code, DPM, PDF417, and High-Density codes). | README |
| BarcodeReaderSettings_Expo | Demonstrates how to configure the barcode reading settings via the Foundational API, including barcode formats, expected barcode count, minimum result confidence, and timeout. | README |
| LocateAnItemWithBarcode_Expo | Demonstrates how to locate an item by scanning or entering its barcode ID, using visual guidance to help find the matching item in real-time video streaming. | README |
| ReadGS1AI_Expo | Demonstrates how to recognize and parse GS1 Application Identifiers (AIs) from barcodes, extracting and formatting fields such as dates and other AI data. | README |
📌 Note on sample types
The samples above are divided into two categories based on the project type:
- React Native CLI samples (non-Expo):
ScanBarcodes_ReadyToUseComponent,ScanBarcodes_FoundationalAPI- Expo (Bare) samples: everything else, as indicated by the
_ExposuffixPlease refer to the README of the sample you want to try for its own build instructions.
Each sample folder contains its own README.md with the prerequisites, the exact commands to install dependencies, generate native projects (Expo samples only), install CocoaPods, and build for Android and iOS. Open the folder of the sample you want to try and follow its README.
Note
- The applications need to run on a physical device rather than a simulator as they require the use of the camera. If you try running one on a simulator, you will most likely run into a number of errors/failures.
- The samples use native modules, so they do not run in Expo Go. Expo samples must be built as a development build with
npx expo run:androidornpx expo run:ios. - If you want to run Android via
Windows, you may encounter some build errors due to theWindows Maximum Path Length Limitation. The samples pin CMake 3.31.6 to work around it, but we still recommend that you keep the project in a directory with a shorter path.
- Guide for Scanning Barcodes with Ready-to-use Component
- Guide for Scanning Barcodes with Foundational APIs
Each sample README also contains an Integration Notes For Your Own Project section with the platform-specific configuration the SDK needs:
- Expo samples — the
expo-build-propertiesplugin inapp.json(cmakeVersionandextraMavenRepos) - CLI samples — the
externalNativeBuildCMake block inandroid/app/build.gradle - iOS, all samples — the
NSCameraUsageDescriptionentry, inapp.jsonfor Expo and inInfo.plistfor CLI
There are two ways to use the Dynamsoft Barcode Reader React-Native SDK:
- You can request a 30-day trial license via the Request a Trial License link.