Skip to content

Introduction

IMPORTANT NOTE

This iOS Swift product is not a new major version of the Objective-C SDK, but the product redesigned in Swift. It introduces significant changes and new capabilities compared to the previous implementation, but it does not maintain backward compatibility. To ensure a smooth transition, follow the dedicated migration guide and thoroughly test in development environments to validate integration and functionality.

Key Features of the iOS NFC SDK

  • Reads the contactless chip of ICAO 9303 identity documents (eMRTD): ID cards, residence permits and e-passports.
  • Opens the chip's secure channel with PACE, falling back to BAC, and performs Chip Authentication and Active Authentication to detect cloned chips.
  • Validates the document with Passive Authentication: every data group is checked against the Document Security Object (SOD), and its signer against a bundled CSCA master list.
  • Accessible and user-friendly UI, with full customization options.
  • Enhanced and more structured configuration management.

The NFC SDK is a Swift library that reads the NFC chip of identity documents on iOS. It guides the user through the reading flow, asks for the data needed to open the chip (unless your app already provides it), reads the chip through the system NFC sheet, verifies its authenticity and returns structured results and events for integration.

Flow

The NFC SDK guides the user through a clear reading flow:

  1. Instructions: The SDK explains how to hold the document against the phone. This screen can be hidden with instructionsShow.
  2. Document data: To open the chip, the SDK needs the document number, the date of birth and the date of expiry. The user enters them in a form, or the SDK skips the form when your app provides them through prefill (for example, from the OCR of a previous document capture).
  3. Chip reading: The system NFC sheet appears and the user holds the document against the top back of the phone until the reading finishes.
  4. Completion: The SDK verifies the authenticity of the chip and returns the results to the host app.

If the reading fails (the document was not detected, it was moved too early, or the user cancelled the system sheet), the SDK shows a feedback screen that lets the user try again. If the document data is wrong, the SDK goes back to the form so the user can correct it.

Document type

The SDK reads documents that follow the ICAO 9303 eMRTD standard and whose chip is opened with the MRZ data (document number, date of birth and date of expiry), such as the Spanish DNIe 3.0 and 4.0, residence permits and e-passports. You can find the complete list of documents here: Documents.

The document type does not need to be configured: the SDK reads any supported document from the data stored in its chip.

Documents that partially follow ICAO 9303

The SDK relies on the ICAO 9303 standard. Some documents only follow it partially (for example, with a malformed or incomplete data group, or with a chip that does not answer as the standard expects), and they may not be read correctly or may fail the authenticity checks. Test the documents your users will read before going to production.

Documents opened with a CAN

Opening the chip with the Card Access Number (CAN) is not supported on iOS.