MJCS Individual Component Based Integration – GBG IDscan Documentation

MJCS Individual Component Based Integration

If for some reason IDSCustomerJourneyController does not suit your needs, MJCS allows to use individual components. 

If you are not trying to perform just on-device capabilities but rather following journey steps required by the backend, please also refer to IEOS driven journeys

Document Scanning

If you would like to scan a document image with its metadata you should use IDSDocumentScannerController. To do so:

Initialise scanner controller and present it

Swift

let scannerController = IDSDocumentScannerController(scannerConfig: config)
scannerController.modalPresentationStyle = .fullScreen
scannerController.delegate = self
present(scannerController, animated: true, completion: nil)

Implement IDSDocumentScannerControllerDelegate delegate protocol to receive events. Once document is scanned, you can extract document image in 2 ways: it depends whether it was captured automatically or with a help of manual capture button on the screen.

Swift

func documentScannerController(_ scanner: IDSDocumentScannerController, didFinishScanningWithInfo info: [AnyHashable : Any]) {
// First we check whether document was autocaptured if not - it was manually capture and we only have an image
        guard let metadata = info[IDSDocumentScannerInfoMetadataObject] as? IDESDocument else {
            self.extractedImgView.image = info[IDSDocumentScannerInfoImage] as? UIImage
            dismiss(animated: true, completion: nil)
            return
        }       
 
        // Extract image from metadata object
        self.extractedImgView.image = metadata.documentImage
        dismiss(animated: true)
}

IDSDocumentScannerController is also capable to scan selfie images and utility documents. You can specify exact scanner type by providing a config to a constructor:

Swift

let config = IDSDocumentScannerConfig.builder().withScannerType(scannerType)

Liveness Component

If you would like to perform a liveness check during your online on-boarding journey, you should use IDSLivenessOnlineViewController. It will perform liveness check based on the backend configuration and send all the metadata to the backend.

Swift

IDSLivenessOnlineViewController(journeyID: "GUID", credentials: credentials, lastStep: lastStep, delegate: self)

It is important that you specify all constructor properties:

  • journeyID – GUID of your journey, which you should receive from the backend once you upload document images
  • credentials – your backend credentials
  • lastStep – a response from your previous request, which asked for a Liveness step. It is important that you pass this object as it has some metadata that is crucial to initiate liveness
  • delegate – where protocol methods will be called to

You then need to implement IDSLivenessOnlineViewControllerProtocol and listen for specific updates from the controller itself.

NFC Component

MJCS has a capability to open biometric chips for documents that have it

Once backend asks for NFC, you should create the scanner and present it on the screen. Since NFC component requires backend integration, you need to pass some information from the previous response as well.

Swift

 let nfcScanner = IDSNFCScannerViewController(credentials: IDSEnterpriseCredentials, lastStepResponse: IDSEnterpriseResponse, completion: @escaping CompletionHandler) 

The completion handler will return the outcome of the step. It could either return failure (please refer to interface documentation) or success with the next required action that the backend asked to perform if there’s any.

Was this page helpful?