MBMicroblinkSDK


@interface MBMicroblinkSDK : NSObject

Entry class for all Microblink SDKs - used for setting up license key and to add support for optimisation of passing data.

  • Undocumented

    Declaration

    Objective-C

    + (instancetype)sharedInstance NS_SWIFT_NAME(shared());

    Swift

    class func shared() -> Self
  • If YES, tooltip limited license key warning messages will appear on screen

    Default: YES.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        BOOL showLicenseKeyTimeLimitedWarning;

    Swift

    var showLicenseKeyTimeLimitedWarning: Bool { get set }
  • Bundle in which the resources for the scanning process should be found. Usually, by default, this is equal to Microblink.bundle located in Main app bundle.

    i.e, this is by default initialized to: [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@“Microblink” ofType:@“bundle”];

    Declaration

    Objective-C

    @property (nonatomic, strong, readwrite) NSBundle *_Nonnull resourcesBundle;

    Swift

    var resourcesBundle: Bundle { get set }
  • Set license buffer and unlock the SDK. Application package will be used to validate the license.

    Declaration

    Objective-C

    - (void)setLicenseBuffer:(NSData *_Nonnull)licenseBuffer;

    Swift

    func setLicenseBuffer(_ licenseBuffer: Data)

    Parameters

    licenseBuffer

    Byte array containing the license.

  • Set license buffer and unlock the SDK. Also define licensee that will be used to validate the license. This method can be used to unlock the SDK in library mode, i.e. when Microblink SDK is being packaged inside 3rd party SDK. Unlocking Microblink SDK in library mode allows usage of single license within multiple application packages.

    Declaration

    Objective-C

    - (void)setLicenseBuffer:(NSData *_Nonnull)licenseBuffer
                 andLicensee:(NSString *_Nonnull)licensee;

    Swift

    func setLicenseBuffer(_ licenseBuffer: Data, andLicensee licensee: String)

    Parameters

    licenseBuffer

    Byte array containing the license.

    licensee

    Licensee to which license is given to.

  • Set license key and unlock the SDK. Application package will be used to validate the license.

    Declaration

    Objective-C

    - (void)setLicenseKey:(NSString *_Nonnull)base64LicenseKey;

    Swift

    func setLicenseKey(_ base64LicenseKey: String)

    Parameters

    base64LicenseKey

    License file encoded as base64 string.

  • Set license key and unlock the SDK. Also define licensee that will be used to validate the license. This method can be used to unlock the SDK in library mode, i.e. when Microblink SDK is being packaged inside 3rd party SDK. Unlocking Microblink SDK in library mode allows usage of single license within multiple application packages.

    Declaration

    Objective-C

    - (void)setLicenseKey:(NSString *_Nonnull)base64LicenseKey
              andLicensee:(NSString *_Nonnull)licensee;

    Swift

    func setLicenseKey(_ base64LicenseKey: String, andLicensee licensee: String)

    Parameters

    base64LicenseKey

    Byte array containing the license.

    licensee

    Licensee to which license is given to.

  • Set the license file and unlock the SDK. Application package will be used to validate the license.

    Declaration

    Objective-C

    - (void)setLicenseResource:(NSString *_Nonnull)fileName
                 withExtension:(NSString *_Nullable)extension
                inSubdirectory:(NSString *_Nullable)subdirectory
                     forBundle:(NSBundle *_Nonnull)bundle;

    Swift

    func setLicenseResource(_ fileName: String, withExtension extension: String?, inSubdirectory subdirectory: String?, for bundle: Bundle)

    Parameters

    fileName

    The name of resource file contained in the directory specified by subdirectory. If you specify nil, the method returns the first resource file it finds with the specified extension in that directory.

    extension

    The filename extension of the file (etc. txt). If you specify an empty string or nil, the extension is assumed not to exist and the file URL is the first file encountered that exactly matches name.

    subdirectory

    The valid path of top-level directory in which file is located inside bundle (etc. licenseFiles/). If you specify an empty string or nil, root direcotry of bundle will be searched.

    bundle

    NSBundle bundle required to access file.

  • Set the license file and unlock the SDK. Also define licensee that will be used to validate the license. This method can be used to unlock the SDK in library mode, i.e. when Microblink SDK is being packaged inside 3rd party SDK. Unlocking Microblink SDK in library mode allows usage of single license within multiple application packages.

    Declaration

    Objective-C

    - (void)setLicenseResource:(NSString *_Nonnull)fileName
                 withExtension:(NSString *_Nullable)extension
                inSubdirectory:(NSString *_Nullable)subdirectory
                     forBundle:(NSBundle *_Nonnull)bundle
                   andLicensee:(nonnull NSString *)licensee;

    Swift

    func setLicenseResource(_ fileName: String, withExtension extension: String?, inSubdirectory subdirectory: String?, for bundle: Bundle, andLicensee licensee: String)

    Parameters

    fileName

    The name of resource file contained in the directory specified by subdirectory.

    extension

    The filename extension of the file (etc. txt). If you specify an empty string or nil, the extension is assumed not to exist and the file URL is the first file encountered that exactly matches name.

    subdirectory

    The valid path of top-level directory in which file is located inside bundle (etc. licenseFiles/). If you specify an empty string or nil, root direcotry of bundle will be searched.

    bundle

    NSBundle bundle required to access file.

    licensee

    Licensee to which license is given to.

  • Returns the string that contains the library build version

    Declaration

    Objective-C

    + (nonnull NSString *)buildVersionString;

    Swift

    class func buildVersionString() -> String

    Return Value

    string that contains the library build version

  • This method returns true when scanning is unsupported on a specific device. Error object contains description of the reason for that.

    Declaration

    Objective-C

    + (BOOL)isScanningUnsupportedForCameraType:(MBCameraType)type
                                         error:(NSError *_Nullable *_Nullable)error;

    Swift

    class func isScanningUnsupported(for type: MBCameraType, error: NSErrorPointer) -> Bool

    Parameters

    type

    The camera type you want to check for.

    error

    If scanning is not supported, when method this method returns, this parameter contains an NSError object that describes the problem. If you are not interested in possible errors, pass in NULL.

    Return Value

    YES if scanning is not supported, NO otherwise.