AAMVA Barcode Verifier

Defined in framework ScanditIdCapture

SDCAamvaBarcodeVerificationStatus

Added in version 6.26.0

The verification status returned by the barcode verifier

SDCAamvaBarcodeVerificationStatusAuthentic

Added in version 6.26.0

The barcode is authentic

SDCAamvaBarcodeVerificationStatusLikelyForged

Added in version 6.26.0

The barcode is likely forged

SDCAamvaBarcodeVerificationStatusForged

Added in version 6.26.0

The barcode is forged

SDCAAMVABarcodeVerificationResult
@interface SDCAAMVABarcodeVerificationResult : NSObject

Added in version 6.15.0

The result of a verification of AAMVA-compliant personal identification document done by SDCAAMVABarcodeVerifier.

allChecksPassed
@property (nonatomic, readonly) BOOL allChecksPassed

Added in version 6.15.0

All checks passed and nothing suspicious about the document was detected.

status
@property (nonatomic, readonly) SDCAamvaBarcodeVerificationStatus status

Added in version 6.26.0

Verification status containing the result of the verification

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

Added in version 6.15.0

Returns the JSON representation of this object.

SDCAAMVABarcodeVerifier
@interface SDCAAMVABarcodeVerifier : NSObject

Added in version 6.15.0

Validates the authenticity of the document by scanning 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). It requires either the full (i.e. front & back) scanning mode or a single-sided scan of the back of the document. Start with creating a capture context and the verifier:

let dataCaptureContext = DataCaptureContext(licenseKey: "-- ENTER YOUR SCANDIT LICENSE KEY HERE --")
let verifier = AamvaBarcodeVerifier(context: dataCaptureContext)

Then either initialize the front & back scanning mode:

let = IdCaptureSettings()
idCaptureSettings.supportedDocuments = [ .dlVIZ ]
idCaptureSettings.capturedSides = .frontAndBack

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

Or initialize single-sided scanning of the back of the document:

let settings = IdCaptureSettings()
settings.supportedDocuments = [ .aamvaBarcode ]

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

Once the capture is complete, trigger the verification process. This process is asynchronous and the result will be delivered once the verification has been completed:

func idCapture(_ idCapture: IdCapture, _ capturedId: CapturedId) {
    guard let barcode = capturedId.aamvaBarcodeResult
    else { return }

    // Trigger the verification. This process is asynchronous.
    verifier.verify(capturedId) { result, error in
        if let error = error {
            // Verification error
        } else if let result = result {
            if result.allChecksPassed {
                // Nothing suspicious was detected.
            } else {
                // Document may be fraudulent or tampered with - proceed with caution.
            }
        }
    }
}
+ verifierWithContext:
+ (instancetype)verifierWithContext:(SDCDataCaptureContext *)context

Added in version 6.15.0

Creates a new instance of this verifier.

- verifyCapturedId:completionHandler:
- (void)verifyCapturedId:(nonnull SDCCapturedId *)capturedId
       completionHandler:(nonnull void (^)(SDCAAMVABarcodeVerificationResult *_Nullable, NSError *_Nullable))completionHandler

Added in version 6.15.0

Asynchronously conduct the verification of the specified AAMVA-compliant personal identification document.