AAMVA Cloud Verifier
Defined in framework ScanditIdCapture
- SDCAAMVACloudVerificationResult
@interface SDCAAMVACloudVerificationResult : NSObject
Added in version 6.15.0
The result of a verification of AAMVA-compliant personal identification document done by SDCAAMVACloudVerifier.
- allChecksPassed
@property (nonatomic, readonly)
BOOL
allChecksPassedAdded in version 6.15.0
All checks passed and nothing suspicious about the document was detected.
- SDCAAMVACloudVerifier
@interface SDCAAMVACloudVerifier : NSObject
Added in version 6.15.0
The verifier that sends data to a Scandit’s server to check the authenticity of an AAMVA-compliant personal identification document.
First, ensure that your Scandit Data Capture SDK license key supports cloud verification. Then, create an instance of SDCAAMVACloudVerifier:
let dataCaptureContext = DataCaptureContext(licenseKey: "-- ENTER YOUR SCANDIT LICENSE KEY HERE --") let verifier = AamvaCloudVerifier(context: dataCaptureContext)
This kind of verification uses only data encoded in the barcode on the back side of the document. Therefore, you may capture both sides of the document, like in the previous example, or you may limit the capture just to the barcode.
Depending on the approach you choose initialize the mode with the following settings for the front & back:
let = IdCaptureSettings() idCaptureSettings.supportedDocuments = [ .dlVIZ ] idCaptureSettings.supportedSides = .frontAndBack let idCapture = IdCapture(context: dataCaptureContext, settings: settings)
Or for the barcode only:
let settings = IdCaptureSettings() settings.supportedDocuments = [ .dlVIZ ] let idCapture = IdCapture(context: dataCaptureContext, settings: settings)
Once the barcode is captured, trigger the verification process. The process is asynchronous and the result will be delivered once our server verifies the received data:
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 { // Unable to reach the server - most probably the device has no internet connection. } 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 *)contextAdded in version 6.15.0
Creates a new instance of this verifier.
- - verifyCapturedId:completionHandler:
- (
void
)verifyCapturedId:(nonnull SDCCapturedId *)capturedId completionHandler:(nonnull void (^)(SDCAAMVACloudVerificationResult *_Nullable, NSError *_Nullable))completionHandlerAdded in version 6.15.0
Connect to asynchronously to the server and conduct the verification of the specified AAMVA-compliant personal identification document.