AAMVA Barcode Verifier

Defined in framework ScanditIdCapture

@interface SDCAAMVABarcodeVerificationResult : NSObject

Added in version 6.15.0

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

@property (nonatomic, readonly) BOOL allChecksPassed

Added in version 6.15.0

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

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

Added in version 6.15.0

Returns the JSON representation of this object.

@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 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.supportedSides = .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, didCaptureIn session: IdCaptureSession, frameData: FrameData) {
    guard let capturedId = session.newlyCapturedId,
        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.