iOS SDK
Prerequisites
Before integrating the SDK, ensure your development environment meets the following requirements:
- Xcode version:
16.4 - iOS Minimum Version:
16.6 - Swift Tools version:
6.0
Adding the SDK to Your Project
You can add the iOS SDK to your project using Swift Package Manager.
Enter the repository URL: https://github.com/idme/idme-mobilesdk-artifacts
Required App Integration Steps
Our Mobile SDK requires camera, microphone, photo library and NFC reader permissions for capturing photos, videos and scanning legal documents during identification. Your application is responsible for declaring the reason why these permissions are used. You need to add the descriptions listed below to Info.plist of your application with the explanation of usage:
NSCameraUsageDescriptionNSMicrophoneUsageDescriptionNSPhotoLibraryUsageDescriptionNFCReaderUsageDescription
You will also need to add the list of application IDs or AIDs it can connect to in your application’s Info.plist file. AIDs uniquely identify an application on an ISO 7816 tag.
You will need to introduce a new entitlement for NFC scanning. Xcode automatically adds this entitlement when you activate the Near Field Communication Tag Reading feature under Signing & Capabilities. Once this feature is enabled, the entitlements file should include the TAG format, as shown below.
Initialization
To initialize the SDK, create a subclass of the App class, and add the following code to your init() method:
You will need to pass in an instance of IDmeSDKConfig while initializing the SDK. This example demonstrates how to create this config:
The tokenProvider in the example is responsible for generating the client access token. This token enables the SDK to make REST API requests to ID.me’s backend APIs. The application must obtain a client access token from ID.me and provide a function to generate a new token if the current one expires. The SDK will then automatically use this to make REST API requests. This example illustrates the signature of this token provider method:
Common Usage Patterns
This section provides examples of common tasks you can perform with our Mobile SDK.
Performing Legal Document Verification
This section details the process of legal document verification utilizing our Mobile SDK. Initiating a verification is straightforward, as demonstrated by the code snippets below.
Checking the Status of an Ongoing Verification
This section describes how to obtain the status of an ongoing verification.
Customizing the Document Scanner User Interface
This section details how to customize the document scanner’s user interface. While default values are based on ID.me’s design system, you have the flexibility to replace any or all of these to align with your application’s aesthetic. We provide customization options for the following elements:
- Colors: Modify the color scheme of various interface elements.
- Button Radius: Control the roundness of buttons within the Mobile SDK.
- Logo: Replace the default ID.me logo with your application’s logo.
- Fonts: Choose the fonts used for all text displayed in the document scanner interface.
Support
If you encounter any issues or have questions, please contact our developer support team. You can reach us at mobile-sdk-issues@id.me.