robotCordova SDK (WiP)

A native and powerful Cordova SDK with advanced ML features.

Overview

The ComplyCube Cordova SDK enables you to embed a full identity verification flow directly into your iOS application using native, mobile-optimized components.

Designed for easy integration, the SDK handles everything from document capture and biometric liveness checks to proof of address and NFC authentication. It’s optimised for speed and accuracy, with features like auto-capture and real-time feedback.

ComplyCube Mobile SDK Demo

Benefits

The SDK offers several benefits:

  • Mobile-native flow: Frictionless user experience using mobile-native UI components. Includes guided flows for capturing selfies, videos, identity documents, and proof of address.

  • Flexible integration: Use workflows to orchestrate complete verification journeys with minimal code, or configure individual stages (e.g. selfie, document, NFC) for more granular control.

  • Biometric verification: Supports photo and video-based liveness checks (PAD Level 2 certified) using passive and active techniques to detect spoofing.

  • Document & NFC verification: Supports OCR and RFID reading from passports, ID cards, and other chip-enabled documents. Cross-checks encrypted chip data for added assurance.

  • Smart auto-capture: Automatically captures selfies and documents with real-time quality checks, reducing user errors and ensuring optimal input for verification.

  • Custom branding: Customize accent colors, text, and logos to match your app’s visual identity.

  • Global-ready: Built-in support for multiple languages and localized UI labels.

circle-info

To integrate workflows into this SDK, see the Blah Blah Blah.

circle-info

For a quick copy-paste example, see the Quick Integration Guide.

Requirements

  • Swift 5.

  • iOS 13 and above.

  • Xcode 13 and above.

Overview of flow

The Mobile SDK runs on your mobile application, but relies on your backend to create secure tokens. Here’s how it works:

1

Create a client

Register a new client (i.e. customer) using the ComplyCube API.

2

Generate an SDK token

Your backend requests a JWT token tied to that client.

3

Initialize the SDK in your mobile app

Pass the token and settings to the SDK initializer.

4

Capture documents, videos, and selfies

The SDK guides your customer through the required steps.

5

Perform checks

Captured data is securely sent to ComplyCube for verification checks, and results are delivered in real time through the API or webhooks.

Mobile SDK Integration flow

Integration guide

1

Install the SDK

  1. Before using the ComplyCube SDK, install the CocoaPods plugin by running the following command in your terminal:

  2. Add plugin repos and install the pod using your Podfile:

Application permissions

Our SDK uses the device camera and microphone for capture. You must add the following keys to your application Info.plist file.

  1. NSCameraUsageDescription

  1. NSMicrophoneUsageDescription

2

Create a client

Every verification flow starts with a client (i.e. customer). Use the API to create the client.

This must be done on your mobile app backend server, not the mobile app itself.

Example request

Example response

The response will contain an id (the Client ID). It is required for the next step.

circle-info

See Clients API Reference to learn more.

3

Generate an SDK token

Your backend must create an SDK token for each new flow. This token enable clients to send personal data securely from your mobile app to ComplyCub.

Tokens are short-lived and must not be reused.

Example request

Example response

circle-info

See SDK Token API Reference to learn more.

4

Prepare the stages

Set up the stages you wish to include in your flow.

5

Initialize the SDK

You can now initialize a flow. The sequence of stages you specify determines the order in which your client sees those stages.

6

Perform checks

Using the results returned in the onSuccess callback, you can trigger your mobile backend to run the necessary checks on your client.

For example, use the result of a selfie and document capture as follows:

Example request for a Document Check

If you have set up webhooks as described in our webhooks guidearrow-up-right, you will be notified once a check completes.

To retrieve the check results, you can perform a get check requestarrow-up-right.

7

Retrieve verification results

Your mobile backend can retrieve all check results using our API.

All our checks are asynchronous. If you have set up webhooks arrow-up-rightas described in our webhooks guidearrow-up-right, you will be notified once a check completes.

To retrieve the check results, you can perform a get check requestarrow-up-right.

Example request

Stages

Each stage in the flow can be customized to create the ideal journey for your customers.

The snippet below demonstrates how to set up a customized flow using the ComplyCube Mobile SDK.

Welcome

The Welcome screen is always shown first in the verification flow. It displays a welcome message along with a summary of the configured stages the user will complete.

You can customize the screen title to align with your app’s tone and branding.

This stage is used to collect explicit user consent before proceeding with the verification flow. It helps you meet regulatory and compliance requirements where applicable.

You can customize the screen title and message to match your legal or branding needs.

Selfie photo and video

You can request either a selfie photo (i.e. a Live Photo) or a selfie video (i.e. a Live Video) from the customer as part of the biometric verification process.

  • Photo: Captures a still image and performs a passive liveness check before allowing submission.

  • Video: Records a short video where the user completes an on-screen challenge (e.g. head movement or spoken phrase).

circle-exclamation

Document

The Document stage allows users to select and capture an identity document for verification (e.g. passport, ID card, residence permit). You can customize these screens to:

  • Limit the scope of document types the client can select, e.g., Passport only.

  • Set the document issuing countries they are allowed for each document type.

  • Add or remove automated capture using smart assistance.

  • Show or hide the instruction screens before capture.

  • Set a retry limit to allow clients to progress the journey regardless of capture quality.

circle-info

If you provide only one document type, the document type selection screen will be skipped. The country selection screen will be skipped if you provide only a single country for a given document type.

You can control whether instructional screens are shown before each camera capture by enabling or disabling guidance mode. Only disable guidance if your users are already clearly informed about the capture steps, as these screens help reduce user error and improve capture quality.

circle-info

Please note the retryLimit you set here will take precedence over the retry limit that has been set globally in your automation settingsarrow-up-right.

NFC capture

The ComplyCube mobile SDK supports NFC-based RFID chip reading for identity documents equipped with embedded chips. This allows for secure data extraction and high-assurance document authentication.

circle-info

Please get in touch with your Account Manager or supportarrow-up-right to get access to our NFC-enabled Mobile SDK.

Pre-requisites

circle-info

To use this feature, your app must have the Near Field Communication Tag Reading capability enabled. To add this capability to your app, refer to Apple's guide herearrow-up-right.

  1. Install the CocoaPods Artifactory plugin by running the following command in your terminal:

  2. To add the library, copy your repository credentials into a .netrc file to your home directory and setup the repository:

    Remember to fetch your credentials from JFrog using the Set Me Up button herearrow-up-right.

  3. Add plugin repos and install the pod using your Podfile:

  4. You must add the following keys to your application Info.plist file:

  1. To read NFC tags correctly, you need to add the following entries to your app target's Info.plist file:

Enabling NFC capture

Address capture

This stage allows users to manually enter their residential address. You can customize it to:

  • Restrict input to specific countries

  • Enable or disable the address autocomplete feature for faster and more accurate entry

Proof of address

This stage allows customers to submit a document verifying their residential address. You can configure which document types are accepted, such as utility bills or bank statements, and choose whether customers can upload a file or must capture the document live using their device camera.

circle-info

By default, this stage includes the address capture stage with autocomplete enabled to assist users during entry. Autocomplete can be disabled if not required.

Completion

You can include a completion stage at the end of the flow to confirm that the process has been successfully finished. This screen provides a clear end point for the user and can be customized to display a confirmation message or next steps.

Branding

The SDK allows you to customize the UI to match your application’s visual identity. You can define primary and accent colors during configuration to align the verification flow with your brand guidelines. Learn more about our appearance properties (see below).

Creating a custom appearance

Before initiating the flow, create your own custom design and integrate it into your Flow Builder.

Applying your custom appearance

Set the custom appearance that you have created using the Flow Builder.

Localization

The SDK supports several languages, including those listed below.

  • Arabic - ar 🇦🇪

  • Chinese (Simplified) - zh 🇨🇳

  • Chinese (Traditional) - hk 🇨🇳

  • Dutch - nl 🇳🇱

  • English - en 🇺🇸

  • French - fr 🇫🇷

  • German - de 🇩🇪

  • Hindi - hi 🇮🇳

  • Indonesian - id 🇮🇩

  • Italian - it 🇮🇹

  • Japanese - ja 🇯🇵

  • Korean - ko 🇰🇷

  • Norwegian - no 🇳🇴

  • Polish - po 🇵🇱

  • Portuguese - pt 🇵🇹

  • Spanish - es 🇪🇸

  • Swedish - sv 🇸🇪

  • Thai - th 🇹🇭

  • Vietnamese - vi 🇻🇳

  • and more...

Result handling

To run verification checks, you must implement the success, cancelled, and error callbacks.

On a successful completion (onSuccess), you can trigger check requests from your backend using the resource IDs returned in the result object. These IDs correspond to the uploaded assets (e.g. documents, selfies) and can be used to initiate verification checks via the ComplyCube API.

If the user exits the flow before completion, the onCancelled callback is invoked with a descriptive reason indicating why the session was cancelled (e.g. user exit, timeout, permission denied)

circle-info

In some cases, the customer may cancel the flow after completing one or more capture stages. If this occurs, any data captured prior to cancellation, such as documents or biometric media, may have already been uploaded to their client record.

If the SDK encounters an issue, the onError callback is triggered with a ComplyCubeError object containing the error type and message. Refer to the error codes (see below), for a full list of possible error cases.

Events tracking

The SDK tracks a range of events throughout the verification flow, covering all key user interactions across stages. See below for the list of events.

If you need to implement custom analytics, you can hook into these events and trigger your own tracking logic accordingly.

To incorporate your own tracking, define a function and apply it using withEventHandler when initializing the FlowBuilder:

Token expiry handling

To handle token expiration gracefully, you can provide a callback function that generates a new SDK token when needed. This allows the flow to continue seamlessly without requiring the user to restart the session manually.