This page covers the Cordova migration from SDK 5.17.x to SDK 6.0.0-beta11.
result.barcodes.cancellation_error.@thegrizzlylabs/cordova-plugin-genius-scan@6.0.0-beta11.cordova-ios 8 or later if you want the v6 Swift Package Manager integration on iOS.cordova-android 15 or later for SDK 6 Android builds.cordova plugin rm @thegrizzlylabs/cordova-plugin-genius-scan
cordova plugin add @thegrizzlylabs/cordova-plugin-genius-scan@6.0.0-beta11
If your app pins Cordova platform versions in config.xml, update them as well:
<preference name="deployment-target" value="15.0" />
<preference name="android-minSdkVersion" value="23" />
<engine name="ios" spec="~8.0.0" />
<engine name="android" spec="~15.0.0" />
If dependency resolution behaves unexpectedly after the upgrade, remove node_modules/, platforms/, and plugins/, then run cordova prepare again.
Keep using cordova.plugins.GeniusScan.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:
cordova.plugins.GeniusScan.scanWithConfiguration(
{
source: 'camera',
structuredData: ['readableCode'],
structuredDataReadableCodeTypes: ['qr', 'code128'],
},
function(result) {
var codes = result.scans[0].structuredData.readableCodes;
},
onError
);
After:
cordova.plugins.GeniusScan.scanWithConfiguration(
{
source: 'camera',
structuredData: ['barcode'],
structuredDataBarcodeTypes: ['qr', 'code128'],
},
function(result) {
var barcodes = result.scans[0].structuredData.barcodes;
},
onError
);
For the complete configuration surface, see the @thegrizzlylabs/cordova-plugin-genius-scan package documentation.
Rename the readable-code API to the barcode API.
| SDK 5 | SDK 6 |
|---|---|
scanReadableCodesWithConfiguration(...) |
scanBarcodesWithConfiguration(...) |
result.readableCodes |
result.barcodes |
Before:
cordova.plugins.GeniusScan.scanReadableCodesWithConfiguration(
configuration,
function(result) {
var codes = result.readableCodes;
},
onError
);
After:
cordova.plugins.GeniusScan.scanBarcodesWithConfiguration(
configuration,
function(result) {
var codes = result.barcodes;
},
onError
);
In SDK 5, Cordova received scan-flow failures as strings. The native cancellation code was not exposed to JavaScript, so apps that suppressed document scan cancellation usually matched the platform message: Scanning cancelled by user on iOS and Scanning canceled by user on Android.
SDK 6 aligns scan-flow error codes across iOS and Android. Cordova receives those codes on the error object: cancellation_error, configuration_error, licensing_error, capture_error, storage_space_error, and internal_error.
Before:
function isSdk5DocumentScanCancellation(error) {
return error === 'Scanning cancelled by user' ||
error === 'Scanning canceled by user';
}
function onScanFlowError(error) {
if (isSdk5DocumentScanCancellation(error)) {
return;
}
showScanError(error || 'Unable to scan');
throw error;
}
After:
function onScanFlowError(error) {
if (error && error.code === 'cancellation_error') {
return;
}
showScanError((error && error.message) || 'Unable to scan');
throw error;
}
After updating the plugin and preparing the native platforms, 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 error callback path. If your app uses OCR, PDF generation, multi-page scanning, or structured data extraction, run those scenarios too.
Start with a free trial license to test the SDK, or contact us directly for a custom quote tailored to your needs.
© 2026 The Grizzly Labs. All rights reserved.