SDK Documentation
  • Welcome!
  • Document Capture
    • Overview
    • Android Native SDK
      • Installation Guide
      • Implementation Guide
      • SDK Response
    • iOS Native SDK
      • Installation Guide
      • Implementation Guide
      • SDK Response
    • React Native Plugin
      • Installation Guide
      • Implementation Guide
      • Plugin Response
    • Flutter Plugin
      • Installation Guide
      • Implementation Guide
      • Plugin Response
    • Cordova Plugin
      • Installation Guide
      • Implementation Guide
      • Plugin Response
    • Release Notes
      • 🟦Latest Patch Release
      • Minor Release - 12/09/2024
      • Major Release - 11/06/24
      • Minor Release - 07/03/24
      • Minor Release - 30/11/23
      • Minor Release - 17/08/23
      • Minor Release - 03/07/23
      • Minor Release - 15/06/23
      • Minor Release - 15/03/23
      • Major Release - 02/04/23
    • 🆕Coming Soon
  • Biometrics
    • Overview
    • Android Native SDK
      • Installation Guide
      • Implementation Guide
      • SDK Response
    • iOS Native SDK
      • Installation Guide
      • Implementation Guide
      • SDK Response
    • React Native Plugin
      • Installation Guide
      • Implementation Guide
      • Plugin Response
    • Flutter Plugin
      • Installation Guide
      • Implementation Guide
      • Plugin Response
    • Cordova Plugin
      • Installation Guide
      • Implementation Guide
      • Plugin Response
    • Release Notes
      • 🟦Latest Patch Release
      • Minor Release - 17/08/23
      • Minor Release - 03/07/23
      • Minor Release - 15/03/23
      • Major Release - 02/04/23
  • SDK Error Codes
  • Support
    • Contact Us
    • Legacy SDKs
Powered by GitBook
On this page
  • Authentication
  • Delegate Confirmation
  • Initialization
  • Configurations
  • Configurations Breakdown
  • Start SDK
  • Sample Integration Example
  1. Biometrics
  2. iOS Native SDK

Implementation Guide

PreviousInstallation GuideNextSDK Response

Last updated 2 months ago

Authentication

A unique access token should be created upon each SDK entry. In order to generate an access token, please refer to Valify's Documentation.

Security Warning: For improved security, consider implementing the access token fetching logic outside the Activity. This helps keep sensitive credentials secure and reduces potential exposure within the Activity/Fragment code.

Delegate Confirmation

Add the following delegate to your view controller.

class ViewController: UIViewController, VIDVLivenessDelegate {}

Initialization

Declare the following variables

var vidvLivenessBuilder = VIDVLivenessBuilder()

Configurations

The SDK builder is separated into two components.

Required Configurations

vidvLivenessBuilder = vidvLivenessBuilder
                .setBundleKey(bundleKey)
                .setBaseUrl(baseUrl)
                .setAccessToken(accessToken)

Optional Configurations

vidvLivenessBuilder = vidvLivenessBuilder

//UI Configurations
 .setLanguage(String) // "en" is set as default
 .setPrimaryColor(UIColor) // default is Valify’s primary color 
 .showErrorDialogs(Bool) //default is true
 
 //UX configurations
 .setNumberOfInstructions(Int) //default is 4
 .setFailTrials(Int) //default is 3
 .setInstructionTimer(Int) //default is 10
 
 //If any of the following functions are added, specified action will be removed
 .withoutCloseEyes()
 .withoutLookLeft() 	 
 .withoutLookRight()
 .withoutSmile()
 
 .withoutVoiceOver()


// to enable face match service use one of the following lines
.setFaceMatchImage(UIImage)
// or
.setFrontTransactionId(String)

//Other configurations
 .setHeaders([String:String]) // default is empty
 .setSSLCertificate(Data) // Data for a certificate file, no default certificate	 

Configurations Breakdown

This section shows the breakdown of all optional builder configurations.

  1. The following line is where the user interface language is set.

 .setLanguage("<insert_language>") // ["ar" or "en"] 

The currently supported languages are Arabic and English

  1. The following line is optional and can be used to set your company's branding color to the SDK's user interface.

.setPrimaryColor(UIColor)
  1. If the following line is set to true, then an error message will appear in the user interface in the case that the user did not pass the face match or the liveness service.

 .showErrorDialogs(Bool)
  1. The integer set in the following line determines how many instructions the user will need to follow to successfully complete a single SDK experience.

 .setNumberOfInstructions(Int)
  1. The integer set in the following line determines how many failed attempts the user has during a single SDK experience.

 .setFailTrials(Int)
  1. The integer set in the following line determines how much time (in seconds) the user will be given to complete each task.

 .setInstructionTimer(Int)
  1. If the following line is added, the SDK will not require the user to close their eyes during the experience.

.withoutCloseEyes()
  1. If the following line is added, the SDK will not require the user to look left during the experience.

.withoutLookLeft()
  1. If the following line is added, the SDK will not require the user to look right during the experience.

.withoutLookRight()
  1. If the following line is added, the SDK will not require the user to smile during the experience.

.withoutSmile()
  1. If the following line is added, voice-over will be removed from the SDK experience.

 .withoutVoiceOver()
  1. If this field has an image filled, then the face match service is enabled and the image will be compared with an image captured of the user's face during the SDK experience.

 .setFaceMatchImage(UIImage)
  1. If this field has the front OCR transaction ID filled, then the face match service is enabled and the referenced transaction ID will be compared with an image captured of the user's face during the SDK experience.

.setFrontTransactionId(frontTansactionId)
  1. The following line is optional and can be used to set any headers that may be required for purposes specific to your application. Any headers set will be sent along with each API call made by the SDK.

.setHeaders([String:String])
  1. The following line is optional and can be used to set an SSL certificate that may be required for purposes specific to your application.

.setSSLCertificate(Data) // Inputstream for a certificate file, no default certificate

Start SDK

Use the following code snippet to run the SDK

vidvLivenessBuilder.start(vc: self, livenessDelegate: self)

Sample Integration Example

Check out our for a simple integration app demonstrating how to use our SDK. The repository includes step-by-step instructions and sample code to help you get started quickly.

Authentication
GitHub repository