Type Definitions

The following type definitions are available globally.

  • Undocumented

    See more

    Declaration

    Objective-C

    typedef enum : int64_t {
        FeatureNoFeature = 1 << 31,
        FeaturePayformDetection = 1 << 0,
        FeatureEdgeDetection = 1 << 1,
        FeatureEdgeDetectionUI = 1 << 2,
        FeatureImageProcessing = 1 << 3,
        FeatureOCR = 1 << 4,
        FeatureDataIntelligence = 1 << 5,
        FeaturePDFCreation = 1 << 6,
        FeatureCloudUpload = 1 << 7,
        FeatureCreditCardRecognition = 1 << 8,
        FeatureQRCode = 1 << 9,
        FeatureW2Detection = 1 << 10,
        FeatureCheck = 1 << 11,
        FeatureInvoiceDetection = 1 << 12,
        FeatureMRZRecognition = 1 << 13,
        FeatureMedicalCertRecognition = 1 << 14,
        FeatureMultipleObjectsDetection = 1 << 15,
        FeatureTextOrientationDetection = 1 << 16,
        FeatureEHICRecognition = 1 << 17,
        FeatureIDCardRecognition = 1 << 18,
        FeatureNFCScanning = 1 << 19,
        FeatureTextLineRecognition = 1 << 20,
        FeatureLicensePlateScanning = 1 << 21,
        FeatureDriverLicenseRecognition = 1 << 22
    } dooFeature
  • The status of the license.

    See more

    Declaration

    Objective-C

    typedef enum dooLicenseStatus dooLicenseStatus
  • An enum describing the current state of the app.

    See more

    Declaration

    Objective-C

    typedef enum SBSDKApplicationState SBSDKApplicationState
  • The generic document fields display status. Whether a field is shown or hidden in the user interface.

    Declaration

    Objective-C

    typedef NSString *SBSDKGenericDocumentFieldDisplayState

    Swift

    typealias SBSDKGenericDocumentFieldDisplayState = NSString
  • Block type to validate a recognition result.

    Declaration

    Objective-C

    typedef BOOL (^SBSDKTextLineRecognizerValidationBlock)(NSString *_Nonnull)

    Swift

    typealias SBSDKTextLineRecognizerValidationBlock = (String) -> Bool
  • Block type to sanitize the raw recognized text of a recognition result.

    Declaration

    Objective-C

    typedef NSString *_Nullable (^SBSDKTextLineRecognizerTextSanitizerBlock)(
        NSString *_Nonnull)

    Swift

    typealias SBSDKTextLineRecognizerTextSanitizerBlock = (String) -> String?
  • This type of block takes a source or input UIImage and a pointer to an NSError object, processes the image and returns the processed image. In case of an error the error pointer is populated.

    Declaration

    Objective-C

    typedef UIImage *_Nullable (^SBSDKImageProcessingHandler)(
        UIImage *_Nonnull, NSError *_Nullable *_Nullable)

    Swift

    typealias SBSDKImageProcessingHandler = (UIImage, NSErrorPointer) -> UIImage?

    Parameters

    sourceImage

    The input image.

    outError

    In case of an error this NSError pointer should be filled with an appropriate NSError.

    Return Value

    The output image.

  • A block type used on informing observers about progress updating.

    Declaration

    Objective-C

    typedef void (^SBSDKProgessUpdateHandler)(SBSDKProgress *_Nonnull)

    Swift

    typealias SBSDKProgessUpdateHandler = (SBSDKProgress) -> Void

    Parameters

    progress

    The progress object that called the update handler.

  • The type of the completion block that each asynchronous ScanbotSDK operation call upon completion.

    Declaration

    Objective-C

    typedef void (^SBSDKCompletionHandler)(
        BOOL, NSError *_Nullable, NSDictionary<NSString *, NSObject *> *_Nullable)

    Swift

    typealias SBSDKCompletionHandler = (Bool, Error?, [String : NSObject]?) -> Void

    Parameters

    finished

    YES, if the operation was finished successfully. NO, if the operation failed or was cancelled.

    error

    An error describing the reason for an unsuccessful operation.

    resultInfo

    A dictionary containing the results

  • An enum describing the resolution of a video or camera stream.

    See more

    Declaration

    Objective-C

    typedef enum SBSDKVideoFrameResolution SBSDKVideoFrameResolution
  • Typealias for license failure handling block. *

    Declaration

    Objective-C

    typedef void (^SBSDKLicenseFailureHandler)(dooLicenseStatus, dooFeature,
                                               NSString *_Nullable)

    Swift

    typealias SBSDKLicenseFailureHandler = (dooLicenseStatus, dooFeature, String?) -> Void