GSKScanFlow
Objective-C
@interface GSKScanFlow : NSObject
Swift
class GSKScanFlow : 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 GSKScanFlowConfiguration.
-
Instantiates a GSKScanFlow with the provided configuration.
Declaration
Objective-C
+ (nonnull instancetype)scanFlowWithConfiguration: (nonnull GSKScanFlowConfiguration *)configuration;
Swift
convenience init(configuration: GSKScanFlowConfiguration)
Parameters
configuration
The provided configuration
-
Present the scan flow.
Declaration
Objective-C
- (void)startFromViewController:(nonnull UIViewController *)viewController onSuccess:(void (^_Nonnull)(GSKScanFlowResult *_Nonnull)) completionBlock failure:(void (^_Nonnull)(NSError *_Nonnull))errorBlock;
Swift
func start(from viewController: UIViewController, onSuccess completionBlock: @escaping (GSKScanFlowResult) -> 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 GSKScanFlowResult object as a parameter. This object gives you access to the scanned documents.
errorBlock
A block called upon error