Skip to content

Migration Guide

From v6.7 to v6.8

  • Changed the constant value for RGLCheckDiagnoseMRZQualityWrongDPI to RGLCheckDiagnoseMRZQualityWrongSymbolPosition. Updated the string associated with it to RGLCheckDiagnoseMRZQualityWrongSymbolPosition.

  • Added new constants to the RGLCheckDiagnose enumeration:

RGLCheckDiagnoseMRZQualityWrongSymbolPosition = 200
RGLCheckDiagnoseMRZQualityWrongMRZWidth = 202
RGLCheckDiagnoseMRZQualityWrongMRZHeight = 203
RGLCheckDiagnoseMRZQualityWrongLinePosition = 204
RGLCheckDiagnoseOCRQualityTextPosition = 220
RGLCheckDiagnoseOCRQualityInvalidFont = 221
RGLCheckDiagnoseOCRQualityInvalidBackground = 222
RGLCheckDiagnoseLasInkInvalidLinesFrequency = 230
  • Changed the value for RGLCheckDiagnoseLastDiagnoseValue from 210 to 250.

From v6.3 to v6.4

  • Added new action to the RGLDocReaderAction enum - RGLDocReaderActionProcessTimeout. It means that if the processing is completed by timeout, this action will be called instead of RGLDocReaderActionComplete.
  • Value of RGLDiDocTypeRegistrationCertificate case in RGLDiDocType enum has been changed from 31 to 206.

From v6.2 to v6.3

For Swift

  • Added NS_SWIFT_NAME for RGLImageQA. Now the Swift compiler will suggest to rename RGLImageQA to ImageQA.
  • Changed the prefix from RGLE to RGL for RGLImageQualityCheckType cases. This change makes the usage of the enum values in Swift more natural. For example, RGLEImageQualityCheckTypeImageGlares turns into ImageQualityCheckType.imageGlares.

For Objective-C

  • Changed RGLImageQualityCheckType to NS_TYPED_ENUM instead of NS_ENUM. If you compared two values of RGLImageQualityCheckType with the == operator, please make sure to update your code to use the -[isEqualTo:] method instead.
  • Changed the prefix from RGLE to RGL for the RGLImageQualityCheckType cases. For example, RGLEImageQualityCheckTypeImageGlares has become RGLImageQualityCheckTypeImageGlares. The same rule applies to all cases from the RGLImageQualityCheckType enum.

From v6.1 to v6.2

The enums RGLRFIDNotificationCodes, RGLRFIDDataFileType, RGLRFIDErrorCodes now use the NS_ENUM. This change makes the usage of the enum values in Swift more natural.
For example, RGLRFIDErrorCodesLayer6AppSelectionFailure turns into RFIDErrorCodes.layer6AppSelectionFailure.

In this specific case, we can see that the RGL prefix was dropped and the enum value was converted to the static member of enumeration that is accessible via the . notation.

Please update the usage of enum values for RGLRFIDNotificationCodes, RGLRFIDDataFileType, RGLRFIDErrorCodes in your project accordingly.

From v5.8 to v6.1

  • DocumentReaderResults has deprecated overallResult: CheckResult. The status is available now with the DocumentReaderResults.status.overallStatus property.
  • RFIDSessionData has deprecated RGLRFIDSessionDataStatus. The status is available with the DocumentReaderResults.status.detailsRFID property.
  • Changed the minimum supported iOS version to 11.

From v5.7 to v5.8

ProcessParams have all the properties exposed as NSNumber to support the optionality for Objective-C.

For Swift

If you set up ProcessParams using literals (such as true \ false, numbers, etc.), the Swift compiler will bridge the literals under the hood. If you need to use variables, add as NSNumber explicitly.

For example:

// Old ⛔️
DocReader.shared.processParams.barcodeTypes = [BarcodeType.QRCODE.rawValue, BarcodeType.AZTEC.rawValue]

// New ✅
DocReader.shared.processParams.barcodeTypes = [BarcodeType.QRCODE.rawValue as NSNumber, BarcodeType.AZTEC.rawValue as NSNumber]

For Objective-C

Note that in v5.8 almost all the ProcessParams properties are NSNumber.

Prefix all the literals for NSNumber with the @ sign, for example:

[RGLDocReader shared].processParams.logs = @YES;
[RGLDocReader shared].processParams.barcodeParserType = @123;
[RGLDocReader shared].processParams.timeout = @20;

Find more examples on the Configuration page.

From v5.1 to v5.2

Note that in v5.2 errors are returned as NSError.

Make sure to update the database along with the SDK.

From v5.0 to v5.1

Make sure to update the database along with the SDK.

From v4.2 to v5.0

Note that in v5.0 the DocReader class is a singleton.

Declare the Configuration settings the following way:

DocReader.shared.processParams.scenario = "Mrz"
DocReader.shared.customization.showResultStatusMessages = true

To get the results continuously, invoke the startNewSession() function:

switch action {
case .complete:
    // pause current scanning session
    DocReader.shared.isCameraSessionIsPaused = true

    // handle results
    // continue the scanning process
    DocReader.shared.isCameraSessionIsPaused = false

Document Type Result

documentType is an array that contains information about each read page.

Graphic Result

gf_DocumentRear was removed; gf_DocumentFront was renamed to gf_DocumentImage (see GraphicFieldType enum).

In order to get the appropriate document side, use the new property pageIndex that is available in the DocumentReaderGraphicResult class.

For example, pageIndex = 0 is the first (front) side of the document; pageIndex = 1 is the second (back) side of the document.

Next Steps