The ID OCR module extracts text from a captured identity document using Optical Character Recognition (OCR). It then shows that text to the user to confirm it's correct before the session continues. When enabled, users can correct missing or misread fields.
The Process ID module (addIdProcess) runs the server-side processing; ID OCR (addOcr) presents the optionally editable review screen to the user. When ID Capture uses scanStep: .both, processing runs automatically and a separate addIdProcess call is not required.
For an overview of this module and how it works, see Review OCR Data.
How you use this module depends on your integration pattern. When the app defines the steps in code, you add the module to an IncdOnboardingFlowConfiguration as shown below; when the flow is defined in Dashboard, you reference it and let the back end drive the steps. See Integration Approaches.
Availability: All variants.
Add ID OCR
- Add an ID Capture module before ID OCR. It runs against a document that has already been captured.
- Add a Process ID module after ID Capture and before ID OCR.
- Add the ID OCR module's editable review screen with
addOcr():// Editable OCR review flowConfig.addOcr(isEditable: true, idRank: .firstID)
ID OCR ships both a v1 and a v2 UI. v2 omits the ID summary screen.
Configuration Options
Configure the module with addOcr().
| Option | Type | Description |
|---|---|---|
isEditable |
Bool |
Lets the user correct extracted values. |
idRank |
IDRank? |
.firstID (default) or .secondID. |
Result
Register the delegate callbacks to receive results:
func onOcrCompleted()
OcrResult (editable review) exposes:
photo: UIImage?,documentNumber: String?,expiryDate: Date?, anddateOfBirth: Date?:nilwhen unavailable.error: IncdError?: Set when the step fails; otherwise,nil.
You can also fetch OCR data headlessly via IncdOnboardingManager.shared.getUserOCRData(_:completion:), which returns an OmniGetOCRDataResult.