GSKScannerUI

@interface GSKScannerUI : NSObject

A high-level scanner module.

You present it and when the user is done, you obtain a result object containing the scanned documents.

The scan flow can be customized with a GSKScannerUIConfiguration.

  • Instantiates a GSKUIScanner with the provided configuration.

    Declaration

    Objective-C

    + (nonnull instancetype)scannerUIWithConfiguration:
        (nonnull GSKScannerUIConfiguration *)configuration;

    Swift

    convenience init(configuration: GSKScannerUIConfiguration)

    Parameters

    configuration

    The provided configuration

  • Present the scan flow.

    Declaration

    Objective-C

    - (void)startFromViewController:(nonnull UIViewController *)viewController
                          onSuccess:(void (^_Nonnull)(GSKScannerUIResult *_Nonnull))
                                        completionBlock
                            failure:(void (^_Nonnull)(NSError *_Nonnull))errorBlock;

    Swift

    func start(from viewController: UIViewController, onSuccess completionBlock: @escaping (GSKScannerUIResult) -> Void, failure errorBlock: @escaping (Error) -> Void)

    Parameters

    viewController

    The view controller to present the scan flow from.

    completionBlock

    A completion block that will be called on the main thread upon completion of the scan flow. It received a GSKScannerUIResult object as a parameter. This object gives you access to the scanned documents.

    errorBlock

    A block called upon error