AAMVA VIZ Barcode Comparison Verifier

Defined in framework ScanditIdCapture

SDCComparisonCheckResult

Added in version 6.11.0

The result of a comparison done by SDCAAMVAVizBarcodeComparisonVerifier of a single piece of data from an AAMVA-compliant personal identification document.

SDCComparisonCheckResultPassed

Added in version 6.11.0

The compared data matches. In some instances the check may permit minor data divergence, to compensate, for example, for a single character misread by OCR.

SDCComparisonCheckResultFailed

Added in version 6.11.0

Some suspicious differences detected. This doesn’t automatically mean that the document is fraudulent, but such document should be inspected more carefully.

SDCComparisonCheckResultSkipped

Added in version 6.11.0

The data necessary to perform the check is missing and thus it is skipped.

SDCComparisonCheck
@protocol SDCComparisonCheck <NSObject>

Added in version 6.11.0

A comparison done by SDCAAMVAVizBarcodeComparisonVerifier of a single piece of data from an AAMVA-compliant personal identification document.

checkResult
@property (nonatomic, readonly) SDCComparisonCheckResult checkResult

Added in version 6.11.0

Whether any suspicious divergence in data is detected.

resultDescription
@property (nonatomic, nonnull, readonly) NSString *resultDescription

Added in version 6.11.0

The human-readable result of the comparison.

SDCStringComparisonCheck
@interface SDCStringComparisonCheck : NSObject <SDCComparisonCheck>

Added in version 6.11.0

The result of the comparison of a string field performed by SDCAAMVAVizBarcodeComparisonVerifier. Check SDCComparisonCheck for more informations.

aamvaBarcodeValue
@property (nonatomic, nullable, readonly) NSString *aamvaBarcodeValue

Added in version 6.11.0

The string field extracted from a barcode present at the back side of an AAMVA-compliant personal identification document.

vizValue
@property (nonatomic, nullable, readonly) NSString *vizValue

Added in version 6.11.0

The string field extracted from a human-readable front side of an AAMVA-compliant personal identification document.

SDCDateComparisonCheck
@interface SDCDateComparisonCheck : NSObject <SDCComparisonCheck>

Added in version 6.11.0

The result of the comparison of a SDCDateResult field performed by SDCAAMVAVizBarcodeComparisonVerifier. Check SDCComparisonCheck for more informations.

aamvaBarcodeValue
@property (nonatomic, nullable, readonly) SDCDateResult *aamvaBarcodeValue

Added in version 6.11.0

The SDCDateResult field extracted from a barcode present at the back side of an AAMVA-compliant personal identification document.

vizValue
@property (nonatomic, nullable, readonly) SDCDateResult *vizValue

Added in version 6.11.0

The SDCDateResult field extracted from a human-readable front side of an AAMVA-compliant personal identification document.

SDCAAMVAVizBarcodeComparisonResult
@interface SDCAAMVAVizBarcodeComparisonResult : NSObject

Added in version 6.11.0

The result of an AAMVA-compliant personal identification document verification conducted by SDCAAMVAVizBarcodeComparisonVerifier.

checksPassed
@property (nonatomic, readonly) BOOL checksPassed

Added in version 6.11.0

Whether all the checks conducted by the verifier passed. Only the check that were run count, so YES is returned even if some of the checks were skipped.

issuingCountryISOMatch
@property (nonatomic, readonly) SDCStringComparisonCheck *issuingCountryISOMatch

Added in version 6.11.0

Whether the issuing countries extracted from both sources of the data are the same.

issuingJurisdictionISOMatch
@property (nonatomic, readonly) SDCStringComparisonCheck *issuingJurisdictionISOMatch

Added in version 6.11.0

Whether the issuing jurisdictions (for example: an issuing state, territory or federal district for USA, or an issuing province or territory for Canada) extracted from both sources of the data are the same.

documentNumbersMatch
@property (nonatomic, readonly) SDCStringComparisonCheck *documentNumbersMatch

Added in version 6.11.0

Whether the document numbers extracted from both sources of the data match. This check may permit minor data divergence, to compensate, for example, for a single character misread by OCR.

fullNamesMatch
@property (nonatomic, readonly) SDCStringComparisonCheck *fullNamesMatch

Added in version 6.11.0

Whether the holder’s full names extracted from both sources of the data match. This check may permit minor data divergence, to compensate, for example, for a single character misread by OCR.

datesOfBirthMatch
@property (nonatomic, readonly) SDCDateComparisonCheck *datesOfBirthMatch

Added in version 6.11.0

Whether the holder’s dates of birth extracted from both sources of the data are the same.

datesOfExpirationMatch
@property (nonatomic, readonly) SDCDateComparisonCheck *datesOfExpirationMatch

Added in version 6.11.0

Whether the document’s dates of expiry extracted from both sources of the data are the same.

datesOfIssueMatch
@property (nonatomic, readonly) SDCDateComparisonCheck *datesOfIssueMatch

Added in version 6.11.0

Whether the document’s dates of issue extracted from both sources of the data are the same.

frontMismatchImage
@property (nonatomic, nullable, readonly) UIImage *frontMismatchImage

Added in version 6.22.0

Jpeg encoded image with mismatched fields highlighted. Returns nil when no mismatch found, or the license does not permit this feature.

resultDescription
@property (nonatomic, nonnull, readonly) NSString *resultDescription

Added in version 6.11.0

The human-readable result of the verification.

JSONString
@property (nonatomic, readonly) NSString *JSONString

Added in version 6.12.0

Returns the JSON representation of this object.

SDCAAMVAVizBarcodeComparisonVerifier
@interface SDCAAMVAVizBarcodeComparisonVerifier : NSObject

Added in version 6.11.0

Validates the authenticity of the document by comparing the data from the VIZ and from the barcode on the back.

This verifier supports documents that follow the Driver License/Identification Card specification by the American Association of Motor Vehicle Administrators (AAMVA) and requires the front & back scanning mode.

Create the verifier and initialize SDCIdCapture with the following settings:

DataCaptureContext dataCaptureContext = DataCaptureContext(licenseKey: "-- ENTER YOUR SCANDIT LICENSE KEY HERE --")

AAMVAVizBarcodeComparisonVerifier verifier = AAMVAVizBarcodeComparisonVerifier()

IdCaptureSettings settings = IdCaptureSettings()
settings.supportedDocuments = [ .dlVIZ ]
settings.supportedSides = .frontAndBack

IdCapture idCapture = IdCapture(context: dataCaptureContext, settings: idCaptureSettings)

Then proceed to capture the front side & the back side of a document as usual. After you capture the back side and receive the combined result for both sides, you may run the verifier as follows:

func idCapture(_ idCapture: IdCapture, didCaptureIn session: IdCaptureSession, frameData: FrameData) {
    guard let capturedId = session.newlyCapturedId,
        let vizResult = capturedId.vizResult,
        vizResult.capturedSides == .frontAndBack
    else { return }

    let result = verifier.verify(capturedId)

    if result.checksPassed {
        // Nothing suspicious was detected.
    } else {
        // You may inspect the results of individual checks, if you wish:
        if (result.datesOfBirthMatch.checkResult == .failed) {
          // The holder’s date of birth from the front side does not match the one encoded in the barcode.
        }
    }
}

The return value allows you to query both the overall result of the verification and the results of individual checks. See SDCAAMVAVizBarcodeComparisonResult for details.

+ verifier
+ (nonnull instancetype)verifier

Added in version 6.11.0

Creates a new instance of this verifier.

+ verifierWithContext:
+ (instancetype)verifierWithContext:(SDCDataCaptureContext *)context

Added in version 6.22.0

Creates a new instance of this verifier.

- verify:
- (nonnull SDCAAMVAVizBarcodeComparisonResult *)verify:(SDCCapturedId *)capturedId

Added in version 6.11.0

Compares the human-readable data from the front side of the document with the data encoded in the barcode, and signals any suspicious differences.