Skip to main content

Initializing the iOS Document Scanner SDK

Free Developer Support

We provide free technical support for the implementation and testing of the Scanbot SDK. If you encounter technical issues with integrating the Scanbot SDK or need advice on choosing the appropriate framework or features, please send us an email.

The Scanbot Document Scanner SDK must be initialized before usage.

To activate the license in the code, use the Scanbot.setLicense(_:) method of the Scanbot class. Call this method as early as possible in your app's runtime, before you use any Scanbot SDK feature. In a UIKit app, a good place is the scene(_:willConnectTo:options:) method of your scene delegate. In a SwiftUI app, set the license in your app type's init() method.

If your license has expired, any invocation of the SDK's API will not work. You can check for license expiration during runtime by using the Scanbot.isLicenseValid property.

Example code for setting the license key string:

func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {

Scanbot.setLicense("YOUR_SCANBOT_SDK_LICENSE_KEY")
}

Want to scan longer than one minute?

Generate a free trial license to test the Scanbot SDK thoroughly.

Get free trial license