Migration Guide

This page contains guidance for migrating from one version to another

Migrating from v5.1 to v5.2

Errors are returned as NSError now.

The database has to be updated along with the SDK as it's a part of it.

Migrating from v5.0 to v5.1

Database

The database has to be updated along with the SDK as it's a part of it.

Migrating from v4.2 to v5.0

The DocReader class is a singleton now.

Custom settings

Custom settings should be declared in the following way:

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

For continuous getting the results the startNewSession() function should be invoked, i.e.:

...
switch action {
...
case .complete:
// pause current scanning session
DocReader.shared.isCameraSessionIsPaused = true
// handle results
...
// continue the scanning process
DocReader.shared.startNewSession()
DocReader.shared.isCameraSessionIsPaused = false
...
}
...

Document Type Result

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

Graphic Result

gf_DocumentRear was removed and gf_DocumentFront was renamed to gf_DocumentImage (see GraphicFieldType enum). In order to get the appropriate document side you should use the new property pageIndex, which is available in DocumentReaderGraphicResult class, e.g. pageIndex = 0 - it’s the first (front) side of the document, pageIndex = 1 - it’s the second (back) side of the document.