Skip to main content

SDK Initialization

License Key

The Docutain Barcode Scanner SDK needs a valid, non-expired license key in order to work. The license key is bound to the app bundle identifier. Any attempt to use a license key in an app with a different app bundle identifier will fail.

Trial license

In order to get a trial license, please contact us.

Production license

To get information about the SDK's functionality and pricing and to purchase a production license, please contact us.

Initialize

In order to use any functionality of the SDK, you must initialize it first. Add the following code to your AppDelegate class:

import DocutainSdk

func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

if(!DocutainSDK.initSDK(licenseKey: YOUR_LICENSE_KEY)){

//init of Docutain SDK failed, get the last error message
let error = DocutainSDK.getLastError()
//your logic to deactivate access to SDK functionality
//...
}

return true
}
caution

If the initialization fails, you are responsible to deactivate access to SDK functionality.