Classes

The following classes are available globally.

  • Main container class, contains both MBBlinkIdOverlayViewController and MBScanningProvider. MBBlinkIdOverlayViewController is used as the UI part of BlinkIDUI, while MBScanningProvider is the part handling scanning logic.

    To start scanning create an instance of MBBlinkIDUI and set it’s delegate.

    Warning

    Hold the reference to your instance of MBBlinkIDUI because it holds the reference to MBScanningProvider and MBBlinkIdOverlayViewController. If you lose the reference to it, scanning might work but you won’t recieve the events.
    See more

    Declaration

    Swift

    @objc
    public class MBBlinkIDUI : 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.
    See more

    Declaration

    Swift

    @objc
    public class MBBlinkSettings : NSObject
  • Container class that has all the properties that define the text being presented to the user through UI components. By default all the strings are read from the BlinkIDUI.strings file shipped with framework

    See more

    Declaration

    Swift

    @objc
    public class MBBlinkLanguageSettings : NSObject
  • Alert contorller will be presented with a mesage that the front and back side data does not match if scanning two sided documents is enabled and the document recognizer is either a combined recognizer, or it’s recognizers can be matched using MBResultValidator.

    See more

    Declaration

    Swift

    @objc
    public class MBDefaultInvalidDocumentHandler : NSObject, MBInvalidDocumentHandler
  • MBDefaultTimeoutHandler is used to present the user with an UIAlertController that notifes them that they can change the Country/Document being scanned. If timerTimeout number of seconds pass without any successfull results this class will present a UIAlertController with a message to user to try changing the Country.

    See more

    Declaration

    Swift

    @objc
    open class MBDefaultTimeoutHandler : NSObject, MBTimeoutHandler
  • MBDocumentChooserViewController class used to present the user with a UI flow to change the document being scanned. It provides the UI to change the country and/or the document being scanned by the user.

    See more

    Declaration

    Swift

    public class MBDocumentChooserViewController : UIViewController
  • MBBlinkIdOverlayViewController contains the UI of BlinkIDUI module. It contains UI components that guide user through scanning process. Main components are:

  • Viewfinder is a simple frame which points the user toward the area where card should be presented, concrete implementation in in MBViewfinderView
  • DocumentSelection storyboard which presents the user with a way to change the type of document they are scanning.
  • Buttons to turn on/off the torch and dismiss the BlinkIDUI view controller.

  • Note

    Most of the UI aspects are customizable either by changing the properties defined through extensions of UIFont and UIColor presented in MBTheme file, or by changing the various properties through MBBlinkSettings sharedInstance.

    See more

    Declaration

    Swift

    public class MBBlinkIdOverlayViewController : MBCustomOverlayViewController
  • Class representing one field, or result of document being scanned.

    See more

    Declaration

    Swift

    public class MBField : NSObject
  • Class representing the results of document scanning

    See more

    Declaration

    Swift

    @objc
    public class MBRecognitionResult : NSObject
  • Class containing country code for countries and country providers

    See more

    Declaration

    Swift

    @objc
    public class MBCountry : NSObject, MBLocalizable
  • Class describing a country document provider. Contains general document providers by default.

    See more

    Declaration

    Swift

    @objc
    public class MBCountryProvider : NSObject
  • Class that describes a document provider It is used to describe what parts of the document can be scanned, what MBRecognizers, what type of document this…

    See more

    Declaration

    Swift

    public class MBDocumentProvider : NSObject