MSSImageScanner 4.29.0
The MSSImageScanner SDK provides a library to scan QR codes and CrontoSign images
Loading...
Searching...
No Matches
QRCodeScannerSDK Class Reference

#import <MSSImageScanner.h>

Inherits NSObject.

Class Methods

(UIViewController *_Nullable) + getQRCodeScannerSDKViewControllerWithDelegate:vibrate:codeType:image:error:
 
(UIViewController *_Nullable) + getQRCodeScannerSDKViewControllerWithDelegate:vibrate:codeType:image:scannerOverlay:scannerOverlayColor:error:
 
(QRCodeScannerSDKDecodingResultData *_Nullable) + decodeImage:codeType:error:
 
(const NSString *) + frameworkVersion
 

Detailed Description

Provides methods for QR Code and Cronto Code scanning

Method Documentation

◆ decodeImage:codeType:error:

+ (QRCodeScannerSDKDecodingResultData *_Nullable) decodeImage: (UIImage *)  image
codeType: (CodeType)  codeType
error: (NSError *_Nullable *_Nullable)  error 

Decodes an image containing Cronto or QR code.

Parameters
imageImage to decode
codeTypethe type of code to scan : CodeTypeQrCode or CodeTypeCrontoCode or both (CodeTypeQrCode | CodeTypeCrontoCode)
errorpointer to a NSError object. This object will be filled in case an error happened. The error can contain one of the following error codes (see QRCodeScannerSDKErrorCodes.h):
  • QRCodeScannerSDKErrorCodes_INVALID_CODE_TYPE if the provided code type is invalid.
  • QRCodeScannerSDKErrorCodes_IMAGE_TOO_BIG if the provided image is too big to process. Maximum width and height of an image is 2048.
  • QRCodeScannerSDKErrorCodes_INVALID_IMAGE if the provided image is invalid and cannot be decoded.
Returns
A result data containing decoded code and its type. Nil if an error happened.
Warning
Maximum width and height of an image is 2048. Make sure the code is in the center of the image, is well focused and not too close, to avoid optical distortions.
The method processes the image and this could take some time to achieve, therefore it should be performed on another queue so that the main queue isn't blocked.

◆ frameworkVersion

+ (const NSString *) frameworkVersion

Returns the current version of QRCodeScannerSDK

◆ getQRCodeScannerSDKViewControllerWithDelegate:vibrate:codeType:image:error:

+ (UIViewController *_Nullable) getQRCodeScannerSDKViewControllerWithDelegate: (id< ScannerDelegate >)  delegate
vibrate: (BOOL)  vibrate
codeType: (CodeType)  codeType
image: (UIImage *_Nullable)  image
error: (NSError *_Nullable *_Nullable)  error 

Returns the QRCodeScanner viewController. You should consider to use the method with a scanner overlay, as it provides better performance and user experience.

Parameters
delegateThe delegate that implement ScannerDelegate protocol.
vibrateTo enable / disable vibration when QRCode is detected
codeTypethe type of code to scan : CodeTypeQrCode or CodeTypeCrontoCode or both (CodeTypeQrCode | CodeTypeCrontoCode)
imageImage for the cancel button. If null, no cancel button will be displayed.
errorpointer to a NSError object. This object will be filled in case an error happened. The error can contain one of the following error codes (see QRCodeScannerSDKErrorCodes.h):
  • QRCodeScannerSDKErrorCodes_INTERNAL_ERROR if an internal error occurs.
  • QRCodeScannerSDKErrorCodes_INPUT_PARAMETER_NULL if the input parameter is null.
  • QRCodeScannerSDKErrorCodes_CAMERA_NOT_AVAILABLE if no camera is available to perform the scanning process.
  • QRCodeScannerSDKErrorCodes_PERMISSION_DENIED if the permission to access to the camera is denied.
  • QRCodeScannerSDKErrorCodes_INVALID_CODE_TYPE if the passed code type is invalid.
Returns
A QRCodeScanner view controller.

◆ getQRCodeScannerSDKViewControllerWithDelegate:vibrate:codeType:image:scannerOverlay:scannerOverlayColor:error:

+ (UIViewController *_Nullable) getQRCodeScannerSDKViewControllerWithDelegate: (id< ScannerDelegate >)  delegate
vibrate: (BOOL)  vibrate
codeType: (CodeType)  codeType
image: (UIImage *_Nullable)  image
scannerOverlay: (BOOL)  scannerOverlay
scannerOverlayColor: (UIColor *_Nullable)  scannerOverlayColor
error: (NSError *_Nullable *_Nullable)  error 

Returns the QRCodeScanner viewController.

Parameters
delegateThe delegate that implement ScannerDelegate protocol.
vibrateTo enable / disable vibration when QRCode is detected
codeTypethe type of code to scan : CodeTypeQrCode or CodeTypeCrontoCode or both (CodeTypeQrCode | CodeTypeCrontoCode)
imageImage for the cancel button. If null, no cancel button will be displayed.
scannerOverlayTo enable / disable the scanner overlay.
scannerOverlayColorUIColor to define the overlay color. If nil the default color (0x99000000) is used.
errorpointer to a NSError object. This object will be filled in case an error happened. The error can contain one of the following error codes (see QRCodeScannerSDKErrorCodes.h):
  • QRCodeScannerSDKErrorCodes_INTERNAL_ERROR if an internal error occurs.
  • QRCodeScannerSDKErrorCodes_INPUT_PARAMETER_NULL if the input parameter is null.
  • QRCodeScannerSDKErrorCodes_CAMERA_NOT_AVAILABLE if no camera is available to perform the scanning process.
  • QRCodeScannerSDKErrorCodes_PERMISSION_DENIED if the permission to access to the camera is denied.
  • QRCodeScannerSDKErrorCodes_INVALID_CODE_TYPE if the provided code type is invalid.
Returns
A QRCodeScanner view controller.

The documentation for this class was generated from the following file: