Deprecation warning

Please note that this is outdated documentation for an older release of the Scandit Barcode Scanner SDK.

We are deprecating the 5.x API on all platforms (except Linux). Release 5.19 in April 2021 will be our final. Applications running 5.x will continue to work, and we will continue to release critical bug fixes and security patches only, for one year. We encourage you to migrate to 6.x and take advantage of our latest / advanced features and improved performance.

You'll find the updated documentation at: Data Capture SDK Documentation for React Native

Integrate the Scandit SDK into your app

To integrate the Scandit Barcode Scanner into your React Native app, follow the simple steps below.

Setup React Native

Instructions are at

Make sure to follow the 'Building Projects with Native Code' guide!

Create a new project

Make sure react-native-cli is installed

> yarn global add react-native-cli

If you do not have a React Native project yet, you should create a new one.

> react-native init helloworld

Add the plugin to your project

Use the React Native CLI to add the plugin to your already existing project.

> cd <directory of your project>
> yarn add scandit-react-native
> react-native link scandit-react-native

Add Android dependencies

  • Download the Barcode Scanner SDK for Android. It's available from your Scandit Barcode Scanner SDK account at in the Downloads section.
  • Inside the archive you will find a file named ScanditBarcodeScanner.aar . Copy it to <directory_of_your_project>/android/libs, then in your main build.gradle file add
allprojects {
repositories {
flatDir {
dirs "$rootDir/libs"

Add iOS dependencies

  • Download the Barcode Scanner SDK for iOS from your Scandit Barcode Scanner SDK account at, Downloads section.
  • In your existing ReactNative project, create a ScanditSDK folder inside the iOS folder and move ScanditBarcodeScanner.framework from Barcode Scanner for iOS package into new ScanditSDK folder.
  • Open the Xcode project and add the required frameworks, see list in
  • In Xcode, drag and drop ScanditBarcodeScanner.framework inside the Framework folder (in the dialog, choose not to copy items).
  • From the Finder, go to ScanditBarcodeScanner.framework/Resources and drag and drop ScanditBarcodeScanner.bundle inside the Framework folder in Xcode (again choose not to copy items).
  • In Xcode, "Linked Frameworks and Libraries" section, delete the greyed out libRCTScanditBarcodeScanner.a and link it again via the plus button.
  • In the Info.plist file add a new row where the key is "NSCameraUsageDescription" and the value is the message that will be shown to the user when camera access is requested.

Instantiate and configure the barcode picker

The scanning process is managed by the BarcodePicker. Before instantiating the picker, you will have to set your Scandit Barcode Scanner license key. The key is available from your Scandit Barcode Scanner SDK account at in the License Keys section. The barcode scanning is configured through an instance of scan settings that you pass to the BarcodePicker as props.

import {
} from 'scandit-react-native';
// Set your license key.
ScanditModule.setAppKey('-- ENTER YOUR SCANDIT LICENSE KEY HERE --');
this.settings = new ScanSettings();
this.settings.setSymbologyEnabled(Barcode.Symbology.EAN13, true);
this.settings.setSymbologyEnabled(Barcode.Symbology.EAN8, true);
this.settings.setSymbologyEnabled(Barcode.Symbology.UPCA, true);

Render the BarcodePicker

Show the scanner to the user by adding it to the render() function.

render() {
return (
ref={(scan) => { this.scanner = scan }}
scanSettings={ this.settings }
onScan={(session) => { this.onScan(session) }}
style={{ flex: 1 }}/>

Add callback to handle the scanning event

You now need to define the function that is referenced in the BarcodePicker props.

onScan(session) {
alert(session.newlyRecognizedCodes[0].data + " " + session.newlyRecognizedCodes[0].symbology);

Start the scanner

Start the actual scanning process to start the camera and look for codes.


Build and run the app

Compile your project. Attach a device and run the app on your desired plattform.

react-native run-android

Next steps