SBSDKUIWorkflowStep
@interface SBSDKUIWorkflowStep : NSObject
A class describing one single step of a workflow. There are some pre-defined workflow steps but you also may may subclass and create your own custom steps.
-
The title being displayed in the ‘SBSDKUIWorkflowScannerViewController’ while it processes the receiver.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSString *title;
Swift
var title: String? { get }
-
A message being displayed in the ‘SBSDKUIWorkflowScannerViewController’ while it processes the receiver.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSString *message;
Swift
var message: String? { get }
-
A block to validate the results of the receiver. In this block you validate the processing results of the receiver and return an error if the validation fails. In case you return an error the step is repeated, otherwise (return nil) the workflow is being continued. If set to nil, no validation is performed and the step is treated as being successful.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) SBSDKUIWorkflowStepValidationHandler resultValidationHandler;
Swift
var resultValidationHandler: SBSDKUIWorkflowStepValidationHandler? { get }
-
An array of required aspect ratios if this step uses document detection.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSArray<SBSDKAspectRatio *> *requiredAspectRatios;
Swift
var requiredAspectRatios: [SBSDKAspectRatio]? { get }
-
An array of accepted machine code types if this step QR- or barcode detection.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSArray<SBSDKBarcodeType *> *acceptedMachineCodeTypes;
Swift
var acceptedMachineCodeTypes: [SBSDKBarcodeType]? { get }
-
Set to YES, if the receiver requires a high-resolution still image shot for its processing.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL wantsCapturedPage;
Swift
var wantsCapturedPage: Bool { get }
-
Set to YES, if the receiver requires a low-resolution video frame image for its processing.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL wantsVideoFramePage;
Swift
var wantsVideoFramePage: Bool { get }
-
Set to YES, if the receiver requires the detection of machine readable codes (QR, barcodes) for its processing.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL wantsMachineReadableCodes;
Swift
var wantsMachineReadableCodes: Bool { get }
-
If set to YES, step validation errors will be displayed as the message. Defaults to NO.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL runsContinuousValidation;
Swift
var runsContinuousValidation: Bool { get }
-
Not available.
Declaration
Objective-C
- (nonnull instancetype)init;
-
Not available.
Declaration
Objective-C
+ (nonnull instancetype)new;
-
-initWithTitle:message:requiredAspectRatios:wantsCapturedPage:wantsVideoFramePage:acceptedMachineReadableCodeTypes:resultValidation:
Designated initializer.
Declaration
Objective-C
- (nonnull instancetype)initWithTitle:(nullable NSString *)title message:(nullable NSString *)message requiredAspectRatios:(nullable NSArray<SBSDKAspectRatio *> *) requiredAspectRatios wantsCapturedPage:(BOOL)wantsCapturedPage wantsVideoFramePage:(BOOL)wantsVideoFramePage acceptedMachineReadableCodeTypes: (nullable NSArray<SBSDKBarcodeType *> *)acceptedMachineReadableCodes resultValidation: (nullable SBSDKUIWorkflowStepValidationHandler) resultValidationHandler;
Swift
init(title: String?, message: String?, requiredAspectRatios: [SBSDKAspectRatio]?, wantsCapturedPage: Bool, wantsVideoFramePage: Bool, acceptedMachineReadableCodeTypes acceptedMachineReadableCodes: [SBSDKBarcodeType]?, resultValidation resultValidationHandler: SBSDKUIWorkflowStepValidationHandler? = nil)
Parameters
title
The title being displayed in the ‘SBSDKUIWorkflowScannerViewController’ while it processes the receiver.
message
A message being displayed in the ‘SBSDKUIWorkflowScannerViewController’ while it processes the receiver.
requiredAspectRatios
An array of required aspect ratios if this step uses document detection.
wantsCapturedPage
Set to YES, if the receiver requires a high-resolution still image shot for its processing.
wantsVideoFramePage
Set to YES, if the receiver requires a low-resolution video frame image for its processing.
acceptedMachineReadableCodes
An array of accepted machine code types if this step QR- or barcode detection.
resultValidationHandler
A block to validate the results of the receiver.
-
Subclasses may override this function to do additional configuration of the ‘SBSDKScannerViewController’ when this step will be executed. Caution: Changes made here are not automatically restored. You are responsible to revert changes made here for other steps.
Declaration
Objective-C
- (void)configureScannerViewController: (nonnull SBSDKScannerViewController *)scanner;
Swift
func configureScannerViewController(_ scanner: SBSDKScannerViewController)
-
Subclasses may override this function to post-process the result, e.g. change filter of captured image, run additional detectors etc.
Declaration
Objective-C
- (void)processResult:(nonnull SBSDKUIWorkflowStepResult *)result;
Swift
func processResult(_ result: SBSDKUIWorkflowStepResult)