1. React Native
  2. Setup

React Native

Setup

The react-native based Vision SDK is an on-device computer vision and NLP based toolkit designed to scan barcodes, QR codes, and extract structured information from logistics documents such as shipping labels, bills of lading (BOLs), and inventory/item labels. Built for real-time performance, it enables fast, offline processing without relying on cloud services. The SDK also supports advanced use cases including item retrieval, price tag extraction, and item counting, making it ideal for warehouse, retail, and logistics applications. With a focus on accuracy, speed, and device-level intelligence, the Vision SDK empowers developers to build seamless and efficient vision-based workflows directly on mobile and embedded devices.

Development Requirements

  • react-native: 0.73+
  • expo sdk: 50+

ios

  • iOS: 13.0+
  • Swift: 5.4.2+
  • Xcode Version: 13.0+

android

  • minSdkVersion: 24
  • compileSdkVersion: 35
  • kotlinVersion: 1.9.0+
  • buildToolsVersion: "35.0.0"

Installation

npm/yarn

npm install react-native-vision-sdk
yarn add react-native-vision-sdk

Usage

Update Info.plist

Add Privacy - Camera Usage Description to Info.plist file

PermissionSettings

Update AndroidManifest.xml

<uses-permission android:name="android.permission.CAMERA" />

Initialization

In order to use the OCR API for information extraction, you have to generate an api key and pass it to the component. See below,

NOTE

You can generate your own API key at cloud.packagex.io. You can find the instruction guide here.

        import VisionSdkView from 'react-native-vision-sdk'

const Example = () => {
    return (
        <VisionSdkView 
            environment={'prod'}
            apiKey={'your_generated_api_key_from_the_platform'}
        />
    )
}