iOS
This guide will get you started on iOS mobile onboarding with Incode.
Incode Mobile Onboarding with iOS
The iOS SDK is part of the Incode Omnichannel Biometric Identity Platform. It supports multiple Incode modules, including Face Recognition, Liveness detection, and ID Validation. An optional video conference module for additional verification of the customer’s identity is available.
An example onboarding app is available for Incode customers in our Github repository. The example app uses IncdOnboarding SDK to enable remote account opening. The installation instructions contain links to this repository. Contact your customer success manager for access.
Prerequisites
To run the example app, you must have the following installed:
- Xcode 13+
- Git LFS
- Cocoapods 1.11 (If applicable)
You must also be using SSH authentication for Git and have it configured on your Mac.
SDK variants
The SDK is available in several variations. These differ in linking type, included features, and resource loading. The default variant is dynamic, has embedded resources, and has no optional features. It is recommended for most users and is versioned as:
<version>-d
For customer who want to reduce the size of their application, the SDK features the ability to use on-demand resources. This causes the app to only download resources at runtime. For more information regarding on-demand resources, see the ODR User Guide.
Semantic versioning guide
The SDK uses custom semantic versioning, with alphabetic symbols representing linking type, specific optional feature(s), and resource loading. Use the examples and explanations that follow to understand this custom versioning. This will help you access the SDK variation that works for your needs.
MAJOR.MINOR.PATCH-LinkingType-Feature1-Feature2-...
Thus, for an SDK with a version of 5.31.1, the default linking type, embedded resources, and the optional features of video streaming and end-to-end encryption, the versioning would be:
5.3.1-d-vc-e2ee
Linking Type
Either linking type can make use of optional features.
| Linking Type | Designation | Example without Optional Features |
|---|---|---|
| Dynamic | -d | <version>-d This is the default. |
| Static | -s | <version>-s |
Optional Features
| Optional Feature | Designation | Example with Default Linking Type |
|---|---|---|
| Video Streaming | -vc | <version>-d-vc |
| Local Face Authentication | -1 | <version>-d-1 |
| Local Face Mask Check | -m | <version>-d-m |
| NFC Scan | -nfc | <version>-d-nfc |
| End-to-End Encryption | -e2ee | <version>-d-e2ee |
| Risk Analysis | ra | <version>-d-ra |
Installation
There are three different methods to add the SDK to your app:
- Installation via CocoaPods
- Installation via SPM (Available only for specific variants. Other variants coming soon)
- Manual installation
Cocoapods and SPM are the most convenient and fastest ways to get the SDK installed on your app. This is especially true if your project already uses these dependency managers. Manual installation offers more flexibility and configurability within your project settings.
Cocoapods Installation
- Make sure you have all the Prerequisites.
- Choose the SDK variant you want to install.
- In your Podfile, specify the source and the pod as shown in the following example:
source '[email protected]:Incode-Technologies-Example-Repos/IncdDistributionPodspecs.git'-
`pod 'IncdOnboarding', '5.14.0-d'`
- In the Terminal, navigate to your app's project directory and run the
pod installcommand.If you're using a static variant of the SDK, add the following values to the "Import Paths" build setting:
"$(SRCROOT)/Pods/IncdOnboarding/IncdOnboarding.xcframework/ios-arm64""$(SRCROOT)/Pods/IncdOnboarding/IncdOnboarding.xcframework/ios-x86_64-simulator" - Drag & drop the
Incode-Info.plistfrom the example project to your Xcode project. You can put it anywhere inside of the Project navigator. - In the “Choose options for adding these files” window, select Copy items if needed, select Create groups, and then select the targets you want to use.
- Open the
Incode-Info.plistinside your Xcode project and set theOnboardingURL,OnboardingApiKey, andConferenceURLto the respective values provided by Incode. - Depending on the modules you want to use, you can adapt your
Info.plistby adding:NSCameraUsageDescription: Causes the SDK to require camera access to verify the identity of the customer (for example, in ID scan, Selfie scan and so on).NSLocationWhenInUseUsageDescription: Causes the SDK to use the current user location in order to detect exact location for the Geolocation step.NSMicrophoneUsageDescription: Causes the SDK to require microphone access when performing a video call during the Video Conference step or for doing speech recognition during the Video Selfie step.NFCReaderUsageDescription: Causes the SDK to use the NFC Reader for reading NFC chips for documents that contain them, such as passports.
Known Issues and Fixes
Issue Description | Fix |
|---|---|
If you choose a variant using the VideoConference module, there is a CocoaPods bug that links the needed OpenTok dependency twice. This causes a duplicate interface error during runtime. | The Podfile in the example app contains a post-install script to fix this. You can use this script in your own podfile. You can also do a manual fix by deleting the "-framework OpenTok" text from the pods xcconfig file after every |
If you are running a Mac computer with Apple Silicon, you may get errors while trying to install the pod. | Use these two commands in Termninal: |
SPM Installation
- Make sure you have all the Prerequisites.
- Choose the SDK variant you want to use.
- Tap the project in the left side bar and follow the third tab named
Package Dependencies. - Add the SPM repository at https://github.com/Incode-Technologies-Example-Repos/IncdOnboarding-distribution.git.
- When adding the package, select
branchfordependency ruleand enter the full version you want to integrate (for example,5.31.1-dor5.31.1-d-l).
Manual Installation
-
Ensure you have all the Prerequisites (excluding CocoaPods).
-
Clone the SDK distribution repository using
git cloneand check out the tag corresponding to the SDK variant you want to use. You can see a sample tag in the CocoaPods Installation section.Important
Do not download the repository or framework ZIPs directly from GitHub. Only use a Git client to clone the repository. -
Add the SDK Files to your Xcode project:
- Navigate to the
IncdOnboardingfolder in the cloned repository. - Select all files except the
.podspecfile. - Drag and drop the selected files into the Project Navigator of your Xcode project.
- Navigate to the
-
If you are using an SDK variant that includes the Video Conference module, download the required OpenTok framework. Otherwise, skip this step.
- OpenTok-iOS-2.22.3.tar.bz2
- Unzip the downloaded file and drag the extracted framework into your Xcode project.
-
In the "Choose options for adding these files" window, select Copy items if needed, select Create groups, and then select the targets you want to use.
-
For each target, navigate to the "Frameworks, Libraries, and Embedded Content" section and configure the embedding options:
- IncdOnboarding.xcframework (Static variant): Set to Do Not Embed.
- IncdOnboarding.xcframework (Dynamic variant): Set to Embed & Sign.
- opencv2.framework and OpenTok.framework: Set to Do Not Embed.
-
In the "Project Build Settings", add the following to Other Linker Flags:
-l "stdc++" -l "iconv" -framework "VideoToolbox" -
Depending on the SDK modules you plan to use, update your
Info.plistwith the following keys:NSCameraUsageDescription: Causes the SDK to require access to the camera to verify the identity of the user (for example, during ID or selfie scans).NSLocationWhenInUseUsageDescription: Causes the SDK to use location services to detect the user's current location for the Geolocation step.NSMicrophoneUsageDescription: Causes the SDK to require microphone access when performing video calls during the Video Conference step or for speech recognition during the Video Selfie step.NFCReaderUsageDescription: Causes the SDK to use the NFC Reader for reading NFC chips for documents that contain them, such as passports.
Run the Example App
- Make sure you have all the of prerequisites.
- Clone or download this project from Github: (Incode-Welcome-Example-iOS).
- Follow the installation instructions for the method you want to use: Cocoapods, SPM, or manual installation.
- If you installed the SDK using Cocoapods, open
Omni.xcworkspace. If you used SPM or manual installation, openOmni.xcodeproj. - Open
Environment/Incode-Info.plistand set the following provided values:IncdOnboardingURL[string] with the Onboarding URLIncdOnboardingApiKey[string] with the API keyConferenceURL[string] with the Onboarding URL (If applicable)
- Run the Omni scheme.
Updated 21 days ago
Next, check out the Standard Integration guide on getting Incode up and running.
