Skip to content

Installation

Add the following to your Package.swift:

swift
dependencies: [
    .package(url: "https://github.com/OVD-Kinegram-AG/emrtd-connector-sdk-ios", from: "2.13.2")
]

The package includes the KinegramEmrtd.xcframework binary dependency automatically.

CocoaPods

Add the following to your Podfile:

ruby
pod 'KinegramEmrtdConnector', '~> 2.13.2'

Then run pod install.

Note: CocoaPods support is provided for compatibility with existing projects. We recommend using Swift Package Manager, as CocoaPods is only in maintenance mode since September 2024 (official announcement).

Requirements Setup

1. Enable NFC Capability

The required entitlement is added automatically by Xcode when enabling the Near Field Communication Tag Reading capability in the target's Signing & Capabilities.

After enabling the capability, the *.entitlements file needs to contain the TAG (application-specific tag, including ISO 7816 tags) and PACE (needed for PACE polling support with some ID cards) formats:

xml
<dict>
    <key>com.apple.developer.nfc.readersession.formats</key>
    <array>
        <string>PACE</string>
        <string>TAG</string>
    </array>
</dict>

2. Info.plist Configuration

The app needs to define the list of AIDs (Application Identifiers) it can connect to in the Info.plist file. eMRTDs use the AIDs A0000002471001 and A0000002472001:

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

Additionally, set the NFCReaderUsageDescription key:

xml
<key>NFCReaderUsageDescription</key>
<string>This app uses NFC to verify passports</string>