Search…
Integrate the Secure ID Verification SDK
Integrate the Secure ID Verification SDK into your application

Prerequisites

Get Started

Integrate the iOS SDK

Add this line to your Podfile near the line pod 'SudoUser'
1
pod 'SudoIdentityVerification'
Copied!
Install pod dependencies by running the following command in your project directory:
1
pod install --repo-update
Copied!
This will update the local CocoaPods repository and install the latest version of the Secure ID Verification SDK.
In order to instantiate an Secure ID Verification client, make sure you have followed instructions for Getting Started and User SDK (see Prerequisites above)
To instantiate a client in your application, add the following
Swift
1
import SudoIdentityVerification
2
​
3
do {
4
let identityVerificationClient: SudoIdentityVerificationClient = try DefaultSudoIdentityVerificationClient(
5
sudoUserClient: userClient
6
)
7
catch let error {
8
// Handle initialization error. An error might be thrown due to invalid
9
// or missing confiugration file.
10
}
Copied!
You only need one client instance for a given user and device. Instantiating multiple clients with the same configuration and using them at the same time may cause unexpected runtime errors to occur.

Integrate the Android SDK

To use Secure ID Verification SDK in an Android app you need to add SudoIdentityVerification library as a dependency to your project.
Edit the app module Gradle script (build.gradle) and add SudoIdentityVerification library as a dependency.
gradle
1
dependencies {
2
api 'com.sudoplatform:sudoidentityverification:$latest_version'
3
}
Copied!
The latest version of the SDK can be found at SDK Releases.
Edit AndroidManifest.xml to add the following app permissions:
Diff
1
<?xml version="1.0" encoding="utf-8"?>
2
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ xmlns:tools="http://schemas.android.com/tools"
4
package="com.sudoplatform.sampleapp">
5
​
6
+ <uses-permission android:name="android.permission.INTERNET" />
7
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
8
+ <uses-permission android:name="android.permission.WAKE_LOCK" />
9
+ <uses-permission android:name="android.permission.READ_PHONE_STATE" />
10
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
11
+ <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
12
​
13
<application
14
+ tools:replace="android:allowBackup"
15
+ android:allowBackup="false"
Copied!
Instantiating and initializing a client:
Kotlin
1
val client = SudoIdentityVerificationClient.builder(appContext, sudoUserClient).build()
Copied!
You only need one client instance for a given user per device. Instantiating multiple clients with the same configuration and using them at the same time may cause unexpected runtime errors to occur.

Integrate the JS SDK

To use the Sudo Secure ID Verification SDK in a Web or Node.js project, you must add @sudoplatform/sudo-secure-id-verification as a dependency to your project.
1
yarn add '@sudoplatform/sudo-secure-id-verification'
2
# or
3
npm install --save '@sudoplatform/sudo-secure-id-verification'
Copied!

SDK Configuration

Before starting to use SudoSecureIdVerificationClient you must configure it using the configuration information provided to you for your instance of the Sudo Platform. Download and install your project's SDK configuration file before proceeding.
Instantiating and initializing a client:
TypeScript
1
import { DefaultConfigurationManager } from '@sudoplatform/sudo-common'
2
import { DefaultSudoUserClient } from '@sudoplatform/sudo-user'
3
import { DefaultApiClientManager } from '@sudoplatform/sudo-api-client'
4
import { DefaultSudoSecureIdVerificationClient } from '@sudoplatform/sudo-secure-id-verification'
5
​
6
// Set configuration (content of file downloaded in previous step) in the configuration manager
7
DefaultConfigurationManager.getInstance().setConfig(configJson)
8
​
9
// Set up Sudo User client
10
const sudoUserClient = new DefaultSudoUserClient()
11
DefaultApiClientManager.getInstance().setAuthClient(sudoUserClient)
12
​
13
// Instantiate and initialize the client
14
const client = new DefaultSudoSecureIdVerificationClient({ sudoUserClient })
Copied!
You only need one client instance for a given user per device. Instantiating multiple clients with the same configuration and using them at the same time may cause unexpected runtime errors to occur.
Last modified 1mo ago