React Native SDK 6 Migration Guide

This page covers the React Native migration from SDK 5.17.x to SDK 6.0.0-beta11.

What changed in SDK 6

  • The React Native package now wraps the SDK 6 native minimums: iOS 15 or later and Android API 23 or later.
  • Document scan configuration and results use barcode terminology when extracting codes as structured data.
  • The standalone readable-code configuration and scan method now use barcode terminology.
  • Barcode scan results now use result.barcodes.
  • Scan-flow errors use aligned SDK 6 string codes; user cancellation is surfaced as a cancellation_error promise rejection.

Requirements

  • Update the package to @thegrizzlylabs/react-native-genius-scan@6.0.0-beta11.
  • Make sure the native projects satisfy the SDK 6 requirements: iOS 15 or later and Android API 23 or later.
npm install @thegrizzlylabs/react-native-genius-scan@6.0.0-beta11

For Android, make sure minSdkVersion is 23 or higher. If your React Native template already uses a higher value, keep it.

For iOS, set the deployment target to at least 15.0. In your ios/Podfile, this is usually configured with:

platform :ios, '15.0'

Document scanning

Keep using RNGeniusScan.scanWithConfiguration(...) for document scanning.

If your SDK 5 document scan flow extracted readable codes as structured data, update that configuration and result access to barcode terminology.

Before:

const result = await RNGeniusScan.scanWithConfiguration({
  source: 'camera',
  structuredData: ['readableCode'],
  structuredDataReadableCodeTypes: ['qr', 'code128'],
});

const codes = result.scans[0].structuredData?.readableCodes;

After:

const result = await RNGeniusScan.scanWithConfiguration({
  source: 'camera',
  structuredData: ['barcode'],
  structuredDataBarcodeTypes: ['qr', 'code128'],
});

const barcodes = result.scans[0].structuredData?.barcodes;

For the complete configuration surface, see the @thegrizzlylabs/react-native-genius-scan package documentation.

Barcode scanning

Rename the readable-code API to the barcode API.

SDK 5 SDK 6
ReadableCodeConfiguration BarcodeConfiguration
scanReadableCodesWithConfiguration(...) scanBarcodesWithConfiguration(...)
result.readableCodes result.barcodes

Before:

const configuration: ReadableCodeConfiguration = {
  supportedCodeTypes: ['qr', 'code128'],
  isBatchModeEnabled: true,
};

const result = await RNGeniusScan.scanReadableCodesWithConfiguration(configuration);
const codes = result.readableCodes;

After:

const configuration: BarcodeConfiguration = {
  supportedCodeTypes: ['qr', 'code128'],
  isBatchModeEnabled: true,
};

const result = await RNGeniusScan.scanBarcodesWithConfiguration(configuration);
const codes = result.barcodes;

Error handling

In SDK 5, many integrations sent every rejected scan-flow promise to the same failure path: show an error message, log the failure, or rethrow it. If your app already suppressed document scan cancellation, it had to check platform-specific values: com.thegrizzlylabs.gssdk.scanflow.ErrorDomain error 999 on iOS and E_SCAN_CANCELED on Android.

SDK 6 aligns scan-flow error codes across iOS and Android. React Native receives those codes on the rejected promise error: cancellation_error, configuration_error, licensing_error, capture_error, storage_space_error, and internal_error. The error object also carries the native payload fields when available.

Before:

const isSdk5DocumentScanCancellation = (error: any) =>
  error?.code === 'com.thegrizzlylabs.gssdk.scanflow.ErrorDomain error 999' ||
  error?.code === 'E_SCAN_CANCELED';

try {
  await RNGeniusScan.scanWithConfiguration(configuration);
} catch (error: any) {
  if (isSdk5DocumentScanCancellation(error)) {
    return;
  }

  showScanError(error?.message ?? 'Unable to scan');
  throw error;
}

After:

try {
  await RNGeniusScan.scanWithConfiguration(configuration);
} catch (error: any) {
  if (error?.code === 'cancellation_error') {
    return;
  }
  showScanError(error?.message ?? 'Unable to scan');
  throw error;
}

Apply the same SDK 6 pattern to barcode scan flow calls. If your app also logs or rethrows scan-flow failures, do that only after the cancellation_error check.

Final checks

After the package and native project updates, build and run the app on both iOS and Android.

Validate the document scan flow, barcode scan flow, barcode result property, user cancellation handling, and one non-cancellation rejected promise path. If your app uses OCR, PDF generation, multi-page scanning, or structured data extraction, run those scenarios too.

Ready to get started?

Start with a free trial license to test the SDK, or contact us directly for a custom quote tailored to your needs.

Products

Industries

Case Studies

Integration

Company

© 2026 The Grizzly Labs. All rights reserved.