This section is based on building Customer Journey from customer side.
For this we briefly explain:
- Main components
- Logic for Customer Journeys
- Requirements
Assuming that users are going to run the document scanner method from a scanner button that is declared on one of Storyboard’s Controller View.
- Initializing IDSDocumentScannerController
(IBAction)scannerButton:(id)sender {
// Create the controller
IDSDocumentScannerController *controller = [[IDSDocumentScannerController alloc] initWithScannerType:IDSDocumentScannerControllerTypeDocument options:nil];
// Assign Delegate controller.delegate = self;
// Present View Controller
[self presentViewController:controller animated:YES completion:nil];
}
2 – Delegate method when the scanner is unable to perform its’ duties.
(void)documentScannerController:(IDSDocumentScannerController *)scanner didFailWithError:(NSError *)error {
[scanner dismissViewControllerAnimated:YES completion:nil];
}
3 – Delegate method for when the user cancel scan operation.
(void)documentScannerControllerDidCancel:(IDSDocumentScannerController *)scanner;
4 – Delegate method for when the scanner recognizes the document object in image successfully.
(void) documentScannerController:(IDSDocumentScannerController *)scanner didFinishScanningWithInfo:(NSDictionary *)info;