SDK Documentation
  • Welcome!
  • Document Capture
    • Overview
    • Android Native SDK
      • Installation Guide
      • Implementation Guide
      • SDK Response
    • iOS Native SDK
      • Installation Guide
      • Implementation Guide
      • SDK Response
    • React Native Plugin
      • Installation Guide
      • Implementation Guide
      • Plugin Response
    • Flutter Plugin
      • Installation Guide
      • Implementation Guide
      • Plugin Response
    • Cordova Plugin
      • Installation Guide
      • Implementation Guide
      • Plugin Response
    • Release Notes
      • 🟦Latest Patch Release
      • Minor Release - 12/09/2024
      • Major Release - 11/06/24
      • Minor Release - 07/03/24
      • Minor Release - 30/11/23
      • Minor Release - 17/08/23
      • Minor Release - 03/07/23
      • Minor Release - 15/06/23
      • Minor Release - 15/03/23
      • Major Release - 02/04/23
    • 🆕Coming Soon
  • Biometrics
    • Overview
    • Android Native SDK
      • Installation Guide
      • Implementation Guide
      • SDK Response
    • iOS Native SDK
      • Installation Guide
      • Implementation Guide
      • SDK Response
    • React Native Plugin
      • Installation Guide
      • Implementation Guide
      • Plugin Response
    • Flutter Plugin
      • Installation Guide
      • Implementation Guide
      • Plugin Response
    • Cordova Plugin
      • Installation Guide
      • Implementation Guide
      • Plugin Response
    • Release Notes
      • 🟦Latest Patch Release
      • Minor Release - 17/08/23
      • Minor Release - 03/07/23
      • Minor Release - 15/03/23
      • Major Release - 02/04/23
  • SDK Error Codes
  • Support
    • Contact Us
    • Legacy SDKs
Powered by GitBook
On this page
  • VIDVOCRResponse Cases
  • Primary Response Object
  • Object Body
  • SDK Event Logs Response
  • Instance Responses
  1. Document Capture
  2. iOS Native SDK

SDK Response

The response of the SDK will return in the following delegate

func onOCRResult(result: VIDVOCRResponse)

It will return an enum result of type VIDVOCRResponse

VIDVOCRResponse Cases

Success : Process finished successfully

CapturedImages: Images captured are returned in real-time

Note: For theCapturedImagesinstance, images are not processed yet

UserExit : Process terminated by the user with no errors

ServiceFailure : Process finished with the user's failure to pass the service requirements

BuilderError : Process terminated due to an error in the builder

Example

switch result {
case .success(let data):
    // data of type VIDVOCRResult
case .builderError(let code, let message):
    // builder error code & error message
case .serviceFailure(let code, let message, let data):
    // service faluire error code & error message & data of type VIDVOCRResult
case .userExit(let step, let data):
    // last step in the SDK & data of type VIDVOCRResult
case .capturedImages(capturedImageData: let capturedImageData):
    // capturedImageData of type CapturedImageData
    
}

Primary Response Object

VIDVOCRResult

Note: This is the first-level object that contains all the second-level objects

Object Body

  • sessionID <string>

ocrResult <sub-object>
  • firstName <string>

  • fullName <string>

  • religion <string>

  • gender <string>

  • dateOfBirth <string>

  • age <string>

  • maritalStatus <string>

  • husbandName <string>

  • street <string>

  • birthGovernorate <string>

  • policeStation <string>

  • governorate <string>

  • profession <string>

  • releaseDate <string>

  • expiryDate <string>

  • serialNumber <string>

  • frontNid <string>

  • backNid <string>

  • isRootOfTrustCompatible <boolean>

  • transactionIdFront <string>

  • transactionIdBack <string>

  • combinationID <string>

  • documentVerificationPlus <object>

    • frontDataValidity <boolean>

    • backDataValidity <boolean>

    • frontConfidence <int>

    • backConfidence <int>

    • expired <boolean>

  • advancedConfidence <sub-object>

    • fraudDetectionZone <int>

    • fraudDetectionDetails <sub-object>

      • faceFraudZone <int>

      • faceFraudConfidence <double>

      • frontImageManipulationZone <int>

      • frontImageManipulationConfidence <double>

documentVerificationResult <sub-object>
  • success <boolean>

captures <sub-object>
  • nationalIdFront <base64-string>

  • nationalIdBack <base64-string>

hmacDataList <list>
  • serviceID: ocr

  • hmacDigest <string>

  • rawResponse <string>

decryptionKeys <sub-object>
  • nationalIdFrontRequestKey [UInt8]

  • nationalIdBackRequestKey [UInt8]

  • combineResponseKey [UInt8]

SDK Event Logs Response

Note: If the associated delegate is confirmed, event logs will be received through the two objects below

VIDVEvent <object>
  • key <string>

  • Screen <string>

  • type: <string>

  • sessionId: <string>

  • payload <string>

  • timestamp <int64>

  • date <date>

VIDVError <object>
  • code <int16>

  • message <string>

  • screen <string>

  • type <string>

  • sessionId: <string>

  • timestamp <int64>

  • date <date>

Instance Responses

Success

  • VIDVOCRResult <object>

CapturedImages

CapturedImageData <object>
  • nationalIDLabel <string>

  • nationalIdImage <base64-string>

UserExit

  • VIDVOCRResult <object>

  • step <string>

Note: step <string> identifies the point where the user chose to exit the SDK

ServiceFailure

  • VIDVOCRResult <object>

  • code <string>

  • message <string>

BuilderError

  • code <string>

  • message <string>

PreviousImplementation GuideNextReact Native Plugin

Last updated 8 months ago

The raw response in hmacDataList should be mapped to the result object as per the

HMAC Validation Documentation