MBIMicroblinkSDK
@interface MBIMicroblinkSDK : 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 -
Disable or enable showing of toast when trial license key is entered. By default, whenever someone uses trial license key, a toast will appear informing user that license is trial. This feature should protect you from accidentally using trial license key in production version of your app.
Default: YES.
Declaration
Objective-C
@property (nonatomic) BOOL showTrialLicenseWarning;Swift
var showTrialLicenseWarning: Bool { 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 errorCallback:(nonnull MBILicenseErrorBlock)errorCallback;Swift
func setLicenseBuffer(_ licenseBuffer: Data, errorCallback: @escaping MBILicenseErrorBlock)Parameters
licenseBufferByte array containing the license.
errorCallbackA block that get executed when an issue with the license occurs. The only parameter represents the type of the issue.
-
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 errorCallback:(nonnull MBILicenseErrorBlock)errorCallback;Swift
func setLicenseBuffer(_ licenseBuffer: Data, andLicensee licensee: String, errorCallback: @escaping MBILicenseErrorBlock)Parameters
licenseBufferByte array containing the license.
licenseeLicensee to which license is given to.
errorCallbackA block that get executed when an issue with the license occurs. The only parameter represents the type of the issue.
-
Set license key and unlock the SDK. Application package will be used to validate the license.
Declaration
Objective-C
- (void)setLicenseKey:(NSString *_Nonnull)base64LicenseKey errorCallback:(nonnull MBILicenseErrorBlock)errorCallback;Swift
func setLicenseKey(_ base64LicenseKey: String, errorCallback: @escaping MBILicenseErrorBlock)Parameters
base64LicenseKeyLicense file encoded as base64 string.
errorCallbackA block that get executed when an issue with the license occurs. The only parameter represents the type of the issue.
-
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 errorCallback:(nonnull MBILicenseErrorBlock)errorCallback;Swift
func setLicenseKey(_ base64LicenseKey: String, andLicensee licensee: String, errorCallback: @escaping MBILicenseErrorBlock)Parameters
base64LicenseKeyByte array containing the license.
licenseeLicensee to which license is given to.
errorCallbackA block that get executed when an issue with the license occurs. The only parameter represents the type of the issue.
-
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 errorCallback:(nonnull MBILicenseErrorBlock)errorCallback;Swift
func setLicenseResource(_ fileName: String, withExtension extension: String?, inSubdirectory subdirectory: String?, for bundle: Bundle, errorCallback: @escaping MBILicenseErrorBlock)Parameters
fileNameThe 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.
extensionThe 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.
subdirectoryThe 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.
bundleNSBundle bundle required to access file.
errorCallbackA block that get executed when an issue with the license occurs. The only parameter represents the type of the issue.
-
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 errorCallback:(nonnull MBILicenseErrorBlock)errorCallback;Swift
func setLicenseResource(_ fileName: String, withExtension extension: String?, inSubdirectory subdirectory: String?, for bundle: Bundle, andLicensee licensee: String, errorCallback: @escaping MBILicenseErrorBlock)Parameters
fileNameThe name of resource file contained in the directory specified by subdirectory.
extensionThe 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.
subdirectoryThe 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.
bundleNSBundle bundle required to access file.
licenseeLicensee to which license is given to.
errorCallbackA block that get executed when an issue with the license occurs. The only parameter represents the type of the issue.
-
Returns the string that contains the library build version
Declaration
Objective-C
+ (nonnull NSString *)buildVersionString;Swift
class func buildVersionString() -> StringReturn 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:(MBICameraType)type error:(NSError *_Nullable *_Nullable)error;Swift
class func isScanningUnsupported(for type: MBICameraType, error: NSErrorPointer) -> BoolParameters
typeThe camera type you want to check for.
errorIf 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.
View on GitHub
MBIMicroblinkSDK Class Reference