Scanbot

@interface Scanbot : NSObject

Main class of Scanbot SDK. Lets you install the license and allows basic configuration.

  • Enables or disables the Scanbot SDK logging. If enabled Scanbot SDK logs various warnings, errors and info to the console. By default logging is off.

    Declaration

    Objective-C

    + (void)setLoggingEnabled:(BOOL)enabled;

    Swift

    class func setLoggingEnabled(_ enabled: Bool)

    Parameters

    enabled

    YES, if Scanbot SDK should log, NO otherwise.

  • Enables or disables the Scanbot SDK license logging. If enabled Scanbot SDK logs information about the license to the console. By default license logging is enabled.

    Declaration

    Objective-C

    + (void)setLicenseLoggingEnabled:(BOOL)enabled;

    Swift

    class func setLicenseLoggingEnabled(_ enabled: Bool)

    Parameters

    enabled

    YES, if Scanbot SDK should log the license, NO otherwise.

  • A block that is being called when the license or trial time expired. For example you can show an alert to inform your users and the terminate the app. Note: Once the license has expired or is otherwise invalid, none of the SDK classes and functions will return meaningful results.

    Declaration

    Objective-C

    + (void)setLicenseFailureHandler:(SBSDKLicenseFailureHandler _Nullable)handler;

    Swift

    class func setLicenseFailureHandler(_ handler: SBSDKLicenseFailureHandler?)
  • Returns the default license failure handler.

    Declaration

    Objective-C

    + (SBSDKLicenseFailureHandler _Nonnull)defaultLicenseFailureHandler;

    Swift

    class func defaultLicenseFailureHandler() -> SBSDKLicenseFailureHandler

    Return Value

    The default license failure handler.

  • Sets up the default license failure handler which is being called when the license or trial time expired. The default handler shows an alert to inform your users and terminates the app once the user presses OK.

    Declaration

    Objective-C

    + (void)setupDefaultLicenseFailureHandler;

    Swift

    class func setupDefaultLicenseFailureHandler()
  • Sets up the default license failure handler which is being called when the license or trial time expired. The default handler shows an alert to inform your users and terminates the app once the user presses OK. Once the user pressed OK the completion handler is called.

    Declaration

    Objective-C

    + (void)setupDefaultLicenseFailureHandlerWithCompletion:
        (void (^_Nullable)(void))completion;

    Swift

    class func setupDefaultLicenseFailureHandler() async
  • Installs the Scanbot SDK license from a string.

    Declaration

    Objective-C

    + (BOOL)setLicense:(nonnull NSString *)licenseString;

    Swift

    class func setLicense(_ licenseString: String) -> Bool

    Parameters

    licenseString

    The string containing the license.

    Return Value

    YES, if the license was installed and is active, NO otherwise.

  • Checks the active license.

    Declaration

    Objective-C

    + (BOOL)isLicenseValid;

    Swift

    class func isLicenseValid() -> Bool

    Return Value

    YES, if a valid license is installed and not expired or if the trial period is running. NO otherwise.

  • The current license status.

    Declaration

    Objective-C

    + (dooLicenseStatus)licenseStatus;

    Swift

    class func licenseStatus() -> dooLicenseStatus

    Return Value

    the status of the currently set license.

  • The expiration date for license. Returns nil, if there is no expiration date - for example if the license is invalid or not set.

    Declaration

    Objective-C

    + (NSDate *_Nullable)licenseExpirationDate;

    Swift

    class func licenseExpirationDate() -> Date?

    Return Value

    date of license expiration

  • Sets the bundle that contains the additional ScanbotSDK data bundles, which usually is your applications bundle.In this case you don’t need to call this function. If you embedded the data bundles in another bundle you must specify it here.

    Declaration

    Objective-C

    + (void)setResourceBundle:(NSBundle *_Nonnull)resourceBundle;

    Swift

    class func setResourceBundle(_ resourceBundle: Bundle)
  • The bundle that ScanbotSDK searches for its additional data bundles. Defaults to [NSBundle mainBundle].

    Declaration

    Objective-C

    + (NSBundle *_Nullable)resourceBundle;

    Swift

    class func resourceBundle() -> Bundle?
  • Sets the current UIApplication object to ScanbotDK. Helps the SDK creating background tasks when performing long running tasks. If not set, background tasks cannot be performed.

    Declaration

    Objective-C

    + (void)setSharedApplication:(nonnull UIApplication *)application;

    Swift

    class func setSharedApplication(_ application: UIApplication)

    Parameters

    application

    The shared application object of the app. Usually this is set to [UIApplication sharedApplication].

  • Declaration

    Objective-C

    + (nullable UIApplication *)sharedApplication;

    Swift

    class func sharedApplication() -> UIApplication?

    Return Value

    The current UIApplication object set to the ScanbotDK.

  • Declaration

    Swift

    @discardableResult
    @objc
    class func applyConfiguration(_ configuration: ScanbotSDKConfiguration) -> Bool