Hot-Swapping – GBG IDscan Documentation

Hot-Swapping

Hot swapping allows to change profiles before each Customer Journey or Document Scanner calls. This should enable more flexible document scanning for different country, type or regions-based requirements.

Requirements:

  • Technical Account team will provide all required Profile packages as .zip.
  • Customer (You) is responsible for storing, managing, downloading and pre-installing profiles on device.

Simple hot swapping implementation.

1 – Install selected profile, for this you need .zip path and selected TAG – tags can be any name selected by you. Few examples EUROPE, ASIA, France, Belgium, EUROPE_ID_CARDS or COLECTION1. Please note, that once you install the profile we extract the zip file into the filesystem private Library folder, hence if you don’t need the profile anymore, please use utility method to remove them.

[IDESProfileManager install:@”path.zip” withTag:@”GBR” error:&error];

2 – Swap Profile

[MJCS swapWithTag:@”GBR” withCompletion:nil];

3 – Launch DocumentScannerController or CustomerJouneyController.

Note: TAG can be any name, and not “default” as this is reserved and used if you switching back to default profile

Switching back to default profile.

If you want to switch back to default profile, which is added to the app bundle, simply use tag name as default (this will only work if you added default profile).

[MJCS swapWithTag:@”IDESDefaultProfile” withCompletion:nil];

Scanning info results

Example: Recommended approach of Document Scanner Controller scanning result usage:

(void) documentScannerController:(IDSDocumentScannerController *)scanner didFinishScanningWithInfo:( NSDictionary *)info {
IDESDocument *metadata = info[IDSDocumentScannerInfoMetadataObject];
// Check if it was autocaptured if (metadata.documentImage) {
self.extractedImage = metadata.documentImage;
// All other cases such as utility documents, selfie etc.
} else {
self.extractedImage = info[IDSDocumentScannerInfoImage];
}
}

Note 1: Do not use “Smart Capture” (DocumentScannerController with IDSDocumentScannerControllerTypeDocument) to capture A4 documents, use IDSDocumentScannerControllerTypeUtility type or native camera as required resolution is 4k and Smart Capture is caped at 1080p.

Note 2: Do not use “Smart capture” to capture Selfie images, please use IDSDocumentScannerControllerTypeSelfie or native camera instead

Was this page helpful?