Installation

Requirements

  • Xcode 12+

  • iOS 13+

Minimum Supported Devices

Warning

iPads do not yet have NFC reader capabilities.

  • iPhone 7 and 7 Plus

  • iPhone SE (2nd Generation)

Add the XCFramework

Note

Installing the NFC Reader SDK is very similar to installing the Document Scan SDK. The Document Scan SDK is not required for the NFC Reader SDK to work, though we recommend that they are used together.

The NFC Reader SDK is distributed as an XCFramework with support for iOS and any iOS Simulator. While NFC is not supported on a Simulator, this allows you to run and test the rest of your application without the need for a physical device.

First, you will need to move the provided CFNFCReaderSDK.xcframework into your project directory or a subdirectory. From there, you will need to add it to your application target:

add-dependency

Select Other, then Add Files…:

add-files

Navigate to where CFNFCReaderSDK.xcframework is stored, select it, and then click Open:

select-xcframework-in-finder

Make sure the framework is set to Embed & Sign:

embed-and-sign

Configure Project Settings

Before utilizing the iOS NFC reader, you must first update some project settings for your application target.

NFC Tag Reading Capability

Before reading any NFC tags, you must add the Near Field Communication Tag Reading entitlement to your application. This can be enabled under the Signing & Capabilities tab under your target settings:

nfc-entitlement-step-1

nfc-entitlement-step-2

Info.plist Updates

You must add two entries to your Info.plist:

  1. Privacy - NFC Scan Usage Description: User-presentable text describing why the NFC tag reader is used

<key>NFCReaderUsageDescription</key>
<string>This app reads data from passports.</string>
  1. ISO7816 application identifiers for NFC Tag Reader Session: The list of application identifiers utilized by Machine-Readable Travel Documents

<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
    <string>A0000002471001</string>
    <string>A0000002472001</string>
    <string>00000000000000</string>
</array>