---
title: "ID OCR"
url: "https://developer.incode.com/sdk-reference/module-id-info/"
section: "sdk-reference"
group: "iOS SDK / iOS Individual Modules"
version: "v1.1"
status: "live"
---
# ID OCR

The ID OCR module extracts text from a captured identity document using [Optical Character Recognition (OCR)](/get-started-with-incode/glossary/#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](/sdk-reference/module-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](/features-and-modules/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](/sdk-reference/ios-flow-configuration/).

**Availability:** All variants.

## Add ID OCR

1. Add an [ID Capture](/sdk-reference/module-id-scan/) module before ID OCR. It runs against a document that has already been captured.
2. Add a [Process ID](/sdk-reference/module-process-id/) module after ID Capture and before ID OCR.
3. Add the ID OCR module's editable review screen with `addOcr()`:
   ```swift
   // 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:

```swift
func onOcrCompleted()
```

`OcrResult` (editable review) exposes:

- `photo: UIImage?`, `documentNumber: String?`, `expiryDate: Date?`, and `dateOfBirth: Date?`: `nil` when 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`.

<br />