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:

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 TypeDesignationExample without Optional Features
Dynamic-d<version>-d This is the default.
Static-s<version>-s

Optional Features

Optional FeatureDesignationExample 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 Analysisra<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

  1. Make sure you have all the Prerequisites.
  2. Choose the SDK variant you want to install.
  3. 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'`
  1. In the Terminal, navigate to your app's project directory and run the pod install command.
    📘

    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"

  2. Drag & drop the Incode-Info.plist from the example project to your Xcode project. You can put it anywhere inside of the Project navigator.
  3. 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.
  4. Open the Incode-Info.plist inside your Xcode project and set the OnboardingURL, OnboardingApiKey, and ConferenceURL to the respective values provided by Incode.
  5. Depending on the modules you want to use, you can adapt your Info.plist by 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 pod install command.

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:
sudo arch -x86_64 gem install ffi arch -x86_64 pod install

SPM Installation

  1. Make sure you have all the Prerequisites.
  2. Choose the SDK variant you want to use.
  3. Tap the project in the left side bar and follow the third tab named Package Dependencies.
  4. Add the SPM repository at https://github.com/Incode-Technologies-Example-Repos/IncdOnboarding-distribution.git.
  5. When adding the package, select branch for dependency rule and enter the full version you want to integrate (for example, 5.31.1-d or 5.31.1-d-l).

Manual Installation

  1. Ensure you have all the Prerequisites (excluding CocoaPods).

  2. Clone the SDK distribution repository using git clone and 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.

  3. Add the SDK Files to your Xcode project:

    • Navigate to the IncdOnboarding folder in the cloned repository.
    • Select all files except the .podspec file.
    • Drag and drop the selected files into the Project Navigator of your Xcode project.
  4. If you are using an SDK variant that includes the Video Conference module, download the required OpenTok framework. Otherwise, skip this step.

  5. 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.

  6. 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.
  7. In the "Project Build Settings", add the following to Other Linker Flags:

    -l "stdc++" -l "iconv" -framework "VideoToolbox"
  8. Depending on the SDK modules you plan to use, update your Info.plist with 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

  1. Make sure you have all the of prerequisites.
  2. Clone or download this project from Github: (Incode-Welcome-Example-iOS).
  3. Follow the installation instructions for the method you want to use: Cocoapods, SPM, or manual installation.
  4. If you installed the SDK using Cocoapods, open Omni.xcworkspace . If you used SPM or manual installation, open Omni.xcodeproj.
  5. Open Environment/Incode-Info.plist and set the following provided values:
    • IncdOnboardingURL [string] with the Onboarding URL
    • IncdOnboardingApiKey [string] with the API key
    • ConferenceURL [string] with the Onboarding URL (If applicable)
  6. Run the Omni scheme.

What’s Next

Next, check out the Standard Integration guide on getting Incode up and running.