iOS SDK Guide

This guide outlines the steps for integrating the SMSDK framework into your iOS application, enabling identity validation processes through facial biometric verification or document scanning.

Installation
  1. Add the library
    • Download the "SMSDK.xcframework" file.
    • In your Xcode project, navigate to the target's general settings.
    • Go to the "Frameworks, Libraries, and Embedded Content" section.
    • Click the "+" button and add the "SMSDK.xcframework" to your project. Ensure it's set to "Embed & Sign".
  2.  Import Required Libraries

In the file where you plan to use the SDK, import the necessary libraries:

swift

import UIKit
import AdoComponent

The TransactionResponse object will contain the results of the transaction, providing detailed feedback on the validation process.

Minimum SDK Version for iOS


Update the minimum iOS version to iOS 11.0:

Example Implementation

To initiate the SMSDK framework, use the initWith method from the SMManager class. This method requires a delegate and an SMParams object containing the launch parameters. Implement the SMDelegate extension to handle the SDK's response.

Intialization
let params = SMParams(productId: "1",
                      projectName: "lulobankqa",
                      apiKey: "db92efc69991",
                      urlSdk: "https://adocolumbia.ado-tech.com/lulobankqa/api/",
                      token: "",
                      function: 1, // 1 for Liveness, 2 for Document Scanning
                      isFrontSide: false, // true for front, false for back of the document
                      uidDevice: "",
                      language: "en") // "en" for English, "es" for Spanish

let smManagerVC = SMManager.initWith(delegate: self, params: params)
smManagerVC.modalPresentationStyle = .fullScreen
present(smManagerVC, animated: true, completion: nil)

// MARK: - SMDelegate
extension ViewController: SMDelegate {
    func completedWithResult(result: Bool, response: ResultsResponse?) {
        dismiss(animated: true) {
            // Handle the SDK response here
        }
    }
}

Parameters Explained
Resources

Resource files, including animations provided by the client, can be found at the following path within your project:

SMSDKTest/Resources/Animations

Ensure these resources are correctly integrated into your project for the SDK to function as intended.

State Codes Reference

Be aware of the following state codes when processing responses:

Demo Application

For a comprehensive example, including full source code demonstrating the integration and usage of the Scanovate Colombia SDK, visit our GitHub repository:

Scanovate Colombia SDK Demo App For iOS

This demo app provides a hands-on example to help you understand how to integrate and utilize the SDK in your own applications.


Revision #5
Created 22 March 2024 22:08:35 by Admin
Updated 1 April 2024 16:56:40 by Admin