Type Definitions

The following type definitions are available globally.

  • 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.

  • Undocumented

    See more

    Declaration

    Objective-C

    typedef enum dooLicenseStatus dooLicenseStatus
  • 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)(int, int *_Nullable, int)

    Swift

    typealias SBSDKCompletionHandler = (Int32, UnsafeMutablePointer<Int32>?, Int32) -> 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

  • A block to post-process an ‘SBSDKUIPage’.

    Declaration

    Objective-C

    typedef void (^SBSDKUIScanPagePostProcessingHandler)(SBSDKUIPage *_Nonnull)

    Swift

    typealias SBSDKUIScanPagePostProcessingHandler = (SBSDKUIPage) -> Void
  • A block type to validate the results of all steps in a workflow.

    Declaration

    Objective-C

    typedef NSError *_Nullable (^SBSDKUIWorkflowValidationHandler)(
        NSArray<SBSDKUIWorkflowStepResult *> *_Nonnull)

    Swift

    typealias SBSDKUIWorkflowValidationHandler = ([SBSDKUIWorkflowStepResult]) -> Error?
  • A block to validate the result of a workflow step. Return an error if your validation fails, otherwise return nil.

    Declaration

    Objective-C

    typedef NSError *_Nullable (^SBSDKUIWorkflowStepValidationHandler)(
        SBSDKUIWorkflowStepResult *_Nonnull)

    Swift

    typealias SBSDKUIWorkflowStepValidationHandler = (SBSDKUIWorkflowStepResult) -> Error?
  • Typealias for license failure handling block. *

    Declaration

    Objective-C

    typedef void (^SBSDKLicenseFailureHandler)(dooLicenseStatus, dooFeature)

    Swift

    typealias SBSDKLicenseFailureHandler = (dooLicenseStatus, dooFeature) -> Void