Appearance
Installation
Swift Package Manager (Recommended)
In your Xcode project, go to File > Packages > Add Package Dependency and enter the URL of the SDK repository (or the path to the local folder).
CocoaPods
Add the following to your Podfile:
ruby
platform :ios, '13.0'
target 'YourApp' do
use_frameworks!
pod 'KinegramEmrtd', :path => 'SDK/'
endThen 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).
Direct Installation in Xcode
Add the KinegramEmrtd.xcframework to your target's dependencies (Project settings > General > Frameworks, Libraries, and Embedded Content).
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>