The Genius Scan SDK is subject to a commercial license. A license key is required to initialize the SDK across all platforms. The key must match your application identifier (bundle ID for iOS, package name for Android, hostname for Web) and must be valid according to the license’s expiration date.
The SDK can run without a license key but will stop working after 60 seconds. This is useful for testing purposes only.
Please contact us if you don’t have a license key yet. You can also learn more about it in the licensing documentation.
Select your platform below to see how to configure the license key:
Initialize the SDK with your license key as early as possible in your app lifecycle:
import GSSDK
// In your AppDelegate or app initialization
GSK.setLicenseKey("YOUR_LICENSE_KEY")
#import <GSSDK/GSSDK.h>
// In your AppDelegate
[GSK setLicenseKey:@"YOUR_LICENSE_KEY"];
Initialize the SDK in your Application class or main Activity:
import com.geniusscansdk.core.GeniusScanSDK
// In your Application class or MainActivity
GeniusScanSDK.setLicenseKey(context, "YOUR_LICENSE_KEY")
Initialize the SDK with your license key before using any SDK features:
import { setLicenseKey } from "@thegrizzlylabs/web-geniusscan-sdk";
// Set the license key
setLicenseKey("YOUR_LICENSE_KEY").catch((e) => {
console.error(`Error setting Genius Scan SDK license key`, e);
});
When using the script tag approach:
// The SDK is available globally as GSSDK
GSSDK.setLicenseKey("YOUR_LICENSE_KEY").catch((e) => {
console.error(`Error setting Genius Scan SDK license key`, e);
});
Initialize the SDK with your license key:
import RNGeniusScan from '@thegrizzlylabs/react-native-genius-scan';
// Initialize with license key
RNGeniusScan.setLicenseKey('YOUR_LICENSE_KEY', true);
// Note: setLicenseKey doesn't return anything, but other SDK methods
// will fail if the license key is invalid or expired
Initialize the SDK with your license key:
import 'package:flutter_genius_scan/flutter_genius_scan.dart';
// Initialize with license key
FlutterGeniusScan.setLicenseKey('YOUR_LICENSE_KEY', true);
Initialize the SDK after the deviceReady
event:
document.addEventListener('deviceready', function() {
// Initialize with license key
cordova.plugins.GeniusScan.setLicenseKey('YOUR_LICENSE_KEY', true);
}, false);
import { Platform } from 'ionic-angular';
declare var cordova: any;
export class HomePage {
constructor(private platform: Platform) {
platform.ready().then(() => {
cordova.plugins.GeniusScan.setLicenseKey('YOUR_LICENSE_KEY', true);
});
}
}
Initialize the SDK in your app initialization:
using GeniusScanSDK.ScanFlow;
GSK.SetLicenseKey("YOUR_LICENSE_KEY", true);
using GeniusScanSDK.ScanFlow;
GSK.SetLicenseKey("YOUR_LICENSE_KEY", true);
Note: The auto-refresh feature is not currently available for the Web SDK.
On supported platforms, the SDK uses the license key set in your code to automatically refresh your license, ensuring your users always benefit from the SDK features without requiring app updates. This feature is enabled by default on iOS, Android, React Native, Cordova, Flutter, and .NET MAUI.
While we recommend keeping auto-refresh enabled, you can disable it if you prefer to manage license updates manually. When disabled, you’ll need to:
To disable auto-refresh, set the autoRefresh
parameter to false
when calling setLicenseKey
. Here are platform-specific examples:
// Swift - Disable auto-refresh
GSK.setLicenseKey("YOUR_LICENSE_KEY", autoRefresh: false)
// Objective-C - Disable auto-refresh
[GSK setLicenseKey:@"YOUR_LICENSE_KEY" autoRefresh:NO];
// Kotlin - Disable auto-refresh
GeniusScanSDK.setLicenseKey(context, "YOUR_LICENSE_KEY", autoRefresh = false)
// Web SDK doesn't support auto-refresh
// The license key must be updated manually when renewed
setLicenseKey("YOUR_LICENSE_KEY");
Note: The Web SDK does not support automatic license refresh. You must update the license key in your code and redeploy your web application when your license is renewed.
// Disable auto-refresh
RNGeniusScan.setLicenseKey('YOUR_LICENSE_KEY', /* autoRefresh = */ false);
FlutterGeniusScan.setLicenseKey('YOUR_LICENSE_KEY', /* autoRefresh = */ false);
// Disable auto-refresh
cordova.plugins.GeniusScan.setLicenseKey('YOUR_LICENSE_KEY', /* autoRefresh = */ false);
// Disable auto-refresh
GeniusScan.SetLicenseKey("YOUR_LICENSE_KEY", autoRefresh: false);
If the license key is invalid or expired, SDK methods will fail with a license error. It’s recommended to:
Example error handling:
do {
let scanFlow = GSKScanFlow(configuration: configuration)
try await scanFlow.start(from: viewController)
} catch let error as NSError {
if error.domain == GSKErrorDomain && error.code == GSKErrorCode.licenseError.rawValue {
// Handle license error
showAlert("Please update the app to continue scanning documents")
} else {
// Handle other errors
}
}
try {
ScanFlow.scanWithConfiguration(activity, configuration)
} catch (e: LicenseException) {
// Handle license error
showAlert("Please update the app to continue scanning documents")
} catch (e: Exception) {
// Handle other errors
}
try {
const result = await scanWithConfiguration(configuration);
} catch (error) {
if (error.message.includes('license')) {
// Handle license error
alert('Please refresh the page to continue scanning documents');
} else {
// Handle other errors
}
}
For testing purposes, you can use the SDK without a license key:
To obtain a license key:
For licensing questions or support, contact us at sdk@geniusscan.com.
Once you’ve configured your license key, you’re ready to start implementing the SDK features:
© 2025 The Grizzly Labs. All rights reserved.