Skip to content

Installation

The SDK is distributed from Techsign’s private CocoaPods spec repository on GitHub. Ask your Techsign representative for access, then add the pod to your Podfile:

Podfile
platform :ios, '13.0'
target 'YourApp' do
use_frameworks!
pod 'techsigncloudlibs', '2.9.23-wrapper-suppress-ca',
:source => 'https://github.com/Techsign/PODSPECS.git'
end
Terminal window
pod install

From now on open the .xcworkspace file, not the .xcodeproj.

ProveIDApiClient is a Swift client for the Prove ID API. Generate it from the OpenAPI definition (download it from the API Reference tab) with OpenAPI Generator:

Terminal window
openapi-generator generate \
-i openapi.json \
-g swift5 \
-o ProveIDApiClient \
--additional-properties=projectName=ProveIDApiClient,library=alamofire,responseAs=Result

Add the generated folder to your project in Xcode with File → Add Package Dependencies… → Add Local…. It depends on Alamofire 5 and AnyCodable, which Swift Package Manager resolves for you.

Add the usage descriptions to Info.plist. iOS terminates the app if it accesses the camera or NFC without them.

Info.plist
<key>NSCameraUsageDescription</key>
<string>The camera is used to scan your ID document and verify your face.</string>
<key>NFCReaderUsageDescription</key>
<string>NFC is used to read the chip on your ID document.</string>

Only for the NFC step:

  1. In Xcode, under Signing & Capabilities, add Near Field Communication Tag Reading. This creates the entitlement below.
  2. Add the application identifier of ID documents (ICAO 9303) to Info.plist.
YourApp.entitlements
<key>com.apple.developer.nfc.readersession.formats</key>
<array>
<string>TAG</string>
</array>
Info.plist
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
<string>A0000002471001</string>
</array>

Not every device can read NFC. Check before showing the NFC step:

import CoreNFC
let hasNfc = NFCNDEFReaderSession.readingAvailable