Skip to main content

Installation

1. Add the framework

The SDK is provided as OzoneNFC.xcframework (a universal XCFramework supporting both device and simulator slices). Note: CoreNFC tag reading requires a physical iPhone and cannot be tested in the iOS Simulator; the simulator slice is primarily for building and running non-NFC UI and unit tests.

  1. Copy OzoneNFC.xcframework into your project directory.
  2. In Xcode, select your target → GeneralFrameworks, Libraries, and Embedded Content.
  3. Drag in OzoneNFC.xcframework and set it to Embed & Sign.

2. Add the OpenSSL dependency

OzoneNFC requires OpenSSL for passport signature verification. Add it via Carthage:

Cartfile:

github "krzyzanowskim/OpenSSL" "1.1.2301"

Then run:

carthage update --platform iOS --use-xcframeworks

Drag the resulting OpenSSL.xcframework from Carthage/Build/ into your target's Frameworks, Libraries, and Embedded Content and set it to Embed & Sign.

3. Add NFC capabilities

In Xcode, open your target → Signing & Capabilities+ Capability → add Near Field Communication Tag Reading.

TAG is required for eMRTD passport reading. NDEF is optional — only add it if your app also needs to read NDEF-formatted tags (e.g. NFC stickers, business cards):

<key>com.apple.developer.nfc.readersession.formats</key>
<array>
<string>TAG</string>
<!-- Add NDEF only if your app reads NDEF-formatted tags -->
<!-- <string>NDEF</string> -->
</array>

See Apple — How to add a capability and Apple — NFC required capabilities for more details.

4. Update Info.plist

Two entries are required:

NFC usage description (shown in the system permission prompt):

<key>NFCReaderUsageDescription</key>
<string>Required to scan your document through NFC.</string>

ISO 7816 application identifier for eMRTD passports — this is the globally standardised Application Identifier (AID) for the Logical Data Structure 1 (LDS1) application, defined in ICAO Doc 9303 Part 10, Section 3.6.1:

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

5. Import the module

import OzoneNFC

Updating

Download the new OzoneNFC.xcframework and replace the existing one in your project. Review the release notes for any API changes before updating.