MBBlinkSettings

@objc
public class MBBlinkSettings : NSObject

MBBlinkSettings is a singleton containing general setting of MBBlinkIDUI Contains almost all the customization options available without changing the framework If you want to change the color or fonts see MBTheme.swift file.

Warning

Make sure to setup your settings before creating an instance of MBBlinkIDUI.
  • Shared instance

    Declaration

    Swift

    @objc
    public static let sharedInstance: MBBlinkSettings
  • Initial country that will be selected for scanning once the scanning is started.

    • Default: Country of the phone.

    Declaration

    Swift

    @objc
    public var initialCountry: MBCountry
  • Initial document that will be selected for scanning once the scanning is started.

  • Default: ID document.
  • Warning

    Be careful to set the document that is supported by the initial country.

    Declaration

    Swift

    @objc
    public var initialDocument: MBDocumentType
  • Frame grabber mode:

  • nothing: no frames will be returned.
  • successFrames: success frames will be returned through delegate methods set on MBBlinkIDUI class.
  • allFrames: success frames will be returned like when success is set, and the frames used for scanning through MBFrameGrabberDelegate.
  • Note

    for allFrames you must implement and set frameGrabberdelegate
  • Default: .nothing
  • Declaration

    Swift

    @objc
    public var frameGrabberMode: MBFrameGrabberMode
  • If frameGrabberMode is set to allFrames, graber delegate must be provided othervise it mode will rever back to .successFrames

    Declaration

    Swift

    @objc
    public weak var frameGrabberDelegate: MBFrameGrabberRecognizerDelegate?
  • If documents have two sides, both sides will be scanned, otherwise any of the scanning of any of the sides will return results.

    • Default: true.

    Declaration

    Swift

    @objc
    public var shouldScanBothDocumentSides: Bool
  • If documents have two sides, some of them can be validated by checking the values are matching on both sides.

    • Default: true.

    Declaration

    Swift

    @objc
    public var shouldValidateDocuments: Bool
  • If UI should display button to turn on/off the torch.

    • Default: true.

    Declaration

    Swift

    @objc
    public var shouldDisplayTorchButton: Bool
  • If scan sound should be played when document is scanned.

    • Default: true.

    Declaration

    Swift

    @objc
    public var shouldPlayScanSound: Bool
  • If scan torch button should be displayed.

    • Default: true.

    Declaration

    Swift

    @objc
    public var shouldShowTorchButton: Bool
  • If cancel button should be displayed.

    • Default: true.

    Declaration

    Swift

    @objc
    public var shouldShowCancelButton: Bool
  • Settings related to document and country selection process.

    • Default: MBDefaultDocumentChooserSettings.

    Declaration

    Swift

    @objc
    public var documentChooserSettings: MBDocumentChooserSettings
  • Settings related to scanning timeout events.

    • Default: MBDefaultTimeoutHandler.

    Declaration

    Swift

    @objc
    public var timeoutHandler: MBTimeoutHandler
  • Settings related to scanning invalid two sided documents. Will be used if shouldValidateDocuments property is set to true.

    • Default: MBDefaultInvalidDocumentHandler.

    Declaration

    Swift

    @objc
    public var invalidDocumentHandler: MBInvalidDocumentHandler
  • Settings related to UI texts.

    • Default: Localization from BlinkIDUI.strings in Resources folder.

    Declaration

    Swift

    @objc
    public let languageSettings: MBBlinkLanguageSettings