Skip to main content

SDK Initialization | iOS Document Scanner

License#

In order to run the Scanbot SDK functionality within your production app, you have to purchase and use a valid Scanbot SDK license.

Each license key is valid only for a given app bundle identifier. You will be unable to use any of the SDK features if the license key is corrupted, expired or invalid in any other way.

In order to activate the license in the code use the +[ScanbotSDK setLicense:] method in the ScanbotSDK class. Execute this code as early as possible during your app's runtime, but at least before using any Scanbot SDK functionality, e.g. in your application delegates -application:didFinishLaunchingWithOptions: method.

If your license has expired, any invocation of the Scanbot SDK API will terminate your app. To prevent this you should check for license expiration during runtime by calling [ScanbotSDK isLicenseValid]. If this method returns NO, you should disable Scanbot-SDK-using features or any user interfaces.

Example code for using the license string

- (BOOL)application:(UIApplication *)application    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [ScanbotSDK setLicense:    @"P73ZaxJ3VG08E+0sUqcbf+BPmKoCDVmWZthAS/FmYsh2I"    "DT9AJbIKbBRfaDSzjZed4+py7suMYDq++TuzkqVc9CYwGb"    "3VL68OhsOEpUAJ/GOdVfZnSTFvDo1JQvq54nY2+EChviwM"    "CkBXCDO7YSMB/Rp42dlu7x3a/EFbor+PmlBpZhfdwveyWX"    "5MasHiMzgNicdb33hVgyWgcv74NpxL1XyZkcvn7wQrzgzq"    "JtJ63YUI6SPmTZtJB2M+0IMYeQXj1HltWX5mcohEIFPme7"    "hU0BZB3S476QMceeL4bPCZjgu1vjL7kxKurIqmJGT6juGu"    "kFQFJWPoccmgtJnHxI0Cg==U2NhbmJvdFNESwpuZXQuZ"    "G9vLlBheUZvcm1TY2FubmVyRGVtbwowCjEyOA=="];
    return YES;}

Trial licenses#

The Scanbot SDK will run without a license for one minute per session! To get an unrestricted, "no-strings-attached" 30-day trial license, please submit the Trial License Form on our website.

Please kindly note that a trial license can only be used in a development and staging environment. You are not allowed to publish your app to the App Store, Play Store or any 3rd party Android App Store with a trial license.

Purchase a Production License#

To get pricing information and purchase a production license for the Scanbot SDK please request a quote.

License checks in production apps#

If your Scanbot SDK license has expired, any call of the Scanbot SDK API will terminate your app. To prevent this you should always check for license expiration during the runtime by calling the method +[ScanbotSDK isLicenseValid]. If this method returns NO, you should disable any usage of the Scanbot SDK functions or UI components.

We highly recommend implementing a suitable handling of this case in your app!

Example code for checking the license status

if ([ScanbotSDK isLicenseValid]) {    //Making your call into ScanbotSDK API is safe now.    ...}

Updating the license in production apps#

To renew an expired license or extend a valid license with new Scanbot SDK features, you will have to update your app in the App Store. The expiration date and the feature list of a license are contained in an encrypted data part of the license key string. This means a renewal or extension of a license will cause a new license key string to be generated.

Logging#

Scanbot SDK comes with its own console logging. By default the logging is turned on.

You can turn off logging for the Scanbot SDK by using:

[ScanbotSDK setLoggingEnabled:NO];

This will also silence information about the Scanbot SDK license.