Skip to main content

Verify SDK for Android and iOS

In this comprehensive guide, we'll navigate you through the essential steps to kickstart your journey with the Verify SDK on Mobile native apps.

Mobile librairies

Android

Android

Google's open-source operating system for mobile devices.
Use it
iOS

iOS

Apple's mobile operating system for iPhone and iPad.
Use it

Android

Add package

To add the Verify SDK to your Android project, follow these steps:

Step 1. Add the JitPack repository to your build.gradle(.kts) file or settings.gradle(.kts)

Gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}

Step 2. Add the dependency

Gradle
dependencies {
...
}

The Basics

Compose

Verify SDK provide a simple way to use our service with Android Compose. Just call the VerifyView composable function. A session ID is required.

Kotlin Usage:

Kotlin
VerifyView(
sessionId = "...",
lang = VerifyLang.FRENCH,
tier = "...",
onReady = {
...
},
onFinish = {
...
}
)

Attributes list

NameTypeDefaultRequiredDescription
sessionIdstring''YesSession can be referred as a customer verification session. More info
langVerifyLangVerifyLang.ENGLISHNoEvent listener called on every open/close action
tierstringnullNoTier is a simply way to divide your workflow into small pieces. It is very useful when you offer different features based on the verification level of your customer. More info
onReady() => VoidnullNoEvent listener called when the page is fully loaded
onFinished() => VoidnullNoEvent listener called when the user finished verification

Activity (view legacy)

If you're less familiar with compose, you can use our service by calling an Android Activity.

First, you need to add VerifyActivity in your Android Manifest:

xml
<activity
tools:ignore="LockedOrientationActivity"/>

Attributes list

NameTypeDefaultRequiredDescription
sessionIdstring''YesSession can be referred as a customer verification session. More info
langVerifyLangVerifyLang.ENGLISHNoEvent listener called on every open/close action
tierstringnullNoTier is a simply way to divide your workflow into small pieces. It is very useful when you offer different features based on the verification level of your customer. More info

Kotlin Usage:

Kotlin
val intent = Intent(this, VerifyActivity::class.java)
intent.putExtra("sessionId", "...")
intent.putExtra("lang", VerifyLang.ENGLISH)
intent.putExtra("tier", "...")
startActivity(intent)

Android Jetpack Navigation

xml
<argument
app:argType="string" />
<argument
app:argType="io.synaps.sdk.core.VerifyLang" />
<argument
app:argType="string"/>

Languages available

  • en - English
  • fr - French
  • de - German
  • es - Spanish
  • it - Italian
  • ja - Japanese
  • ko - Korean
  • pt - Portuguese
  • ro - Romanian
  • ru - Russian
  • tr - Turkish
  • vi - Vietnamese
  • zh-CN - Simplified Chinese
  • zh-TW - Traditional Chinese

iOS

Add package

pod 'SynapsVerify'

Usage

note

You must first Init a new session using your backend and fetch it using your private authenticated API. You will then need to replace: self.$sessionId by the initialized session ID.

...
@State private var sessionId = ""
var body: some View {
...
Synaps(sessionId: self.$sessionId,
primaryColor: .blue,
secondaryColor: .white, ready: {
print("ready")
}, finished: {
print("finished")
})
...

Properties

sessionId string

Unique verification session identifier

type string

  • individual for KYC (default)
  • corporate for KYB

ready() callback

Called when SDK is ready

finished() callback

Called when user finishes the verification process

lang string (optional)

User language preference

  • en - English
  • fr - French
  • de - German
  • es - Spanish
  • it - Italian
  • ja - Japanese
  • ko - Korean
  • pt - Portuguese
  • ro - Romanian
  • ru - Russian
  • tr - Turkish
  • vi - Vietnamese
  • zh-CN - Simplified Chinese
  • zh-TW - Traditional Chinese

tier string (optional)

Tier ID

2. StoryBoard

How to setup it

The library allows you to use all the features of standard View with a lot of new cool features, customizable from Storyboard or from code.

First of all, drag & drop a new View inside your view controller in storyboard.

Then set the View class to UISynapsIndividual or UISynapsCorporate

Now you are ready to customize your UISynapsIndividual or UISynapsCorporate from the Attributes Inspector of Interface Builder.

Attributes

lang string (optional)

User language preference

  • en - English
  • fr - French
  • de - German
  • es - Spanish
  • it - Italian
  • ja - Japanese
  • ko - Korean
  • pt - Portuguese
  • ro - Romanian
  • ru - Russian
  • tr - Turkish
  • vi - Vietnamese
  • zh-CN - Simplified Chinese
  • zh-TW - Traditional Chinese

tier string

Tier ID

3. How to launch it

note

Make sure to replace your SESSION_ID by a session_id fetch from your backend API.


import SynapsVeriy
import AVFoundation
class ViewController: UIViewController {

@IBOutlet var synaps : UISynapsIndividual!
override func viewDidLoad() {
super.viewDidLoad()
...
}
func yourSessionHandler() {
switch AVCaptureDevice.authorizationStatus(for: .video) {
case .authorized:
synaps.sessionId = SESSION_ID
case .notDetermined:
AVCaptureDevice.requestAccess(for: .video) { granted in
if granted {
self.synaps.sessionId = SESSION_ID
}
}
...
}
}

Now you are ready to listen Synaps event by listening the event Value Changed

Now you are ready to listen Synaps event by listening the event Value Changed

@IBAction func onStatusChanged(sender: UISynapsIndividual) {
if self.synaps.status == "ready" {
...
} else if self.synaps.status == "finished" {
...
}
}