Skip to content

Installation on iOS

How to install Regula Document Reader SDK.

Overview

The component architecture scheme of Regula Document Reader Mobile SDK

The Document Reader SDK consists of two frameworks: API and Core.

The API framework provides the external interface for controlling the process and getting the result. It depends on the Common framework, which provides an interface for the camera and modules used in other Regula SDKs.

The Core framework provides the recognition functionality where all the processing happens. This is the internal framework, it is used by the API framework only and is not accessible for developers. However, it should be referenced in the project.

The database contains document data. The database is required for Core types that support document type recognition.

Requirements

  • The latest stable version of Xcode.

  • Minimum target: iOS 13.0

Installation

CocoaPods

Warning

CocoaPods announced that they will become read-only in December 2026. After that, new pod versions can no longer be published there. For this reason, starting with Release 9.6, we publish new versions to our own repository. Previous versions remain available indefinitely in the CocoaPods registry, and apps that use those CocoaPod versions continue to function.

1. Specify the location of specs:

Podfile
source 'https://github.com/regulaforensics/podspecs.git'

2. Add dependencies:

  • To always use the latest release version, add the following to your Podfile:
Podfile
1
2
pod 'DocumentReader'
pod 'DocumentReaderFullRFID'
  • Alternatively, you can pin to a specific version (for example 1.0.0):
Podfile
1
2
pod 'DocumentReader', '1.0.0'
pod 'DocumentReaderFullRFID', '1.0.0'

3. In Terminal, run the following command from your project directory to install pods:

pod install

Migration from CocoaPods

1. Uninstall CocoaPods dependencies by running the following command in your project directory:

pod deintegrate

2. Delete the CocoaPods-generated .xcworkspace file.

3. Follow Swift Package Manager or Manual Integration instructions.

Swift Package Manager (SPM)

Swift Package Collection

Swift Package Collection is a set of all Regula products in one place.

To add Regula Swift Package Collection to your project, run the following command in Terminal:

swift package-collection add https://pods-master.regulaforensics.com/SPM/PodsCollection-signed.json

or in Xcode:

1. Navigate to File > Add Package Dependencies.

2. In the prompt that appears, click +

3. Select Add Package Collection.

4. In the prompt that appears, enter the collection URL:

https://pods-master.regulaforensics.com/SPM/PodsCollection-signed.json

5. Click Load and then Add Collection.

6. Select the package you want to add.

7. Select the version you want to use. For new projects, we recommend using the newest version.

8. Select the project you want to add the package to.

9. Click Add Package.

Once you're finished, Xcode will begin downloading and resolving dependencies.

Add packages separately

You can add each package individually instead of using the collection. To do so, follow these steps:

1. In Xcode, navigate to File > Add Package Dependencies.

2. In the prompt that appears, enter the API package URL:

https://github.com/regulaforensics/DocumentReader-Swift-Package

3. Select the version you want to use. For new projects, we recommend using the newest version.

4. Select the project you want to add the package.

5. Click Add Package.

6. Now add the Core package by performing steps 2-5 again for the following URL:

https://github.com/regulaforensics/DocumentReaderFullRFID-Swift-Package

Once you're finished, Xcode will begin downloading and resolving dependencies.

Manual integration

1. Download the latest API framework.

2. Download the latest Common framework.

3. Download one of the Core frameworks depending on the functionality you need and the license capabilities.

4. Drag DocumentReader.xcframework, DocumentReaderCore.xcframework, and RegulaCommon.xcframework frameworks into the Frameworks, Libraries, and Embedded Content section of your target:

The Xcode frameworks section highlighted

5. Build and run the project.

Core Types

There is a variety of the Core framework types, each has different features included.

Find the list of available features in the table below.

Feature Description
Visual zone OCR Optical character recognition of the document visual zone text fields based on document templates included in the database.
Document type identification Automatic recognition of the document type: no need to manually select a country, document type, and series for processing.
MRZ OCR Reading and parsing the machine readable zone lines into separate fields.
Barcode recognition Reading the 1D and 2D (PDF417, QR, Aztec, Datamatrix) barcodes and automatic parsing into text fields using included document template specifications if the template database is available and the document type is identified.
Document location Detecting the document boundaries and cropping out the document from the supplied picture.
Graphics cropping Cropping graphic fields, such as a photo portrait and signature, based on templates included in the database.
RFID chip processing Reading data from electronic contactless chips of ePassport, eID, and eDL using NFC hardware, if present.
Security features check For each document type, the SDK can perform selected security checks. For example, UV dull paper check, image patterns (VIS), IR transparency, etc. You can find the security checks by document types in the Documents list.

The size of the Core framework depends on the features included, so choose the one that suits your case the best to optimize the size of your application.

CocoaPods:

Podfile
pod 'DocumentReaderFullRFID'

SPM:

https://github.com/regulaforensics/DocumentReaderFullRFID-Swift-Package

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

CocoaPods:

Podfile
pod 'DocumentReaderFull'

SPM:

https://github.com/regulaforensics/DocumentReaderFull-Swift-Package

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

CocoaPods:

Podfile
pod 'DocumentReaderOCR'

SPM:

https://github.com/regulaforensics/DocumentReaderOCR-Swift-Package

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

CocoaPods:

Podfile
pod 'DocumentReaderMRZ'

SPM:

https://github.com/regulaforensics/DocumentReaderMRZ-Swift-Package

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

CocoaPods:

Podfile
pod 'DocumentReaderBarcode'

SPM:

https://github.com/regulaforensics/DocumentReaderBarcode-Swift-Package

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

CocoaPods:

Podfile
pod 'DocumentReaderFullAuthRFID'

SPM:

https://github.com/regulaforensics/DocumentReaderFullAuthRFID-Swift-Package

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

CocoaPods:

Podfile
pod 'DocumentReaderMRZBarcode'

SPM:

https://github.com/regulaforensics/DocumentReaderMRZBarcode-Swift-Package

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

CocoaPods:

Podfile
pod 'DocumentReaderMRZRFID'

SPM:

https://github.com/regulaforensics/DocumentReaderMRZRFID-Swift-Package

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

CocoaPods:

Podfile
pod 'DocumentReaderDocType'

SPM:

https://github.com/regulaforensics/DocumentReaderDocType-Swift-Package

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

CocoaPods:

Podfile
pod 'DocumentReaderOCRRFID'

SPM:

https://github.com/regulaforensics/DocumentReaderOCRRFID-Swift-Package

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

CocoaPods:

Podfile
pod 'DocumentReaderBarcodeMRZRFID'

SPM:

https://github.com/regulaforensics/DocumentReaderBarcodeMRZRFID-Swift-Package

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

CocoaPods:

Podfile
pod 'DocumentReaderFullAuth'

SPM:

https://github.com/regulaforensics/DocumentReaderFullAuth-Swift-Package

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

CocoaPods:

Podfile
pod 'DocumentReaderBounds'

SPM:

https://github.com/regulaforensics/DocumentReaderBounds-Swift-Package

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

CocoaPods:

Podfile
pod 'DocumentReaderRFID'

SPM:

https://github.com/regulaforensics/DocumentReaderRFID-Swift-Package

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

Info

If you are not sure yet which Core type to choose, consider the fullrfid one. You will be able to get back and change your decision at any moment.

Next Steps