Mobile SDK integration guide

Overview of flow

Supported SDKs

We natively support iOS, Android, React Native, Flutter, and Cordova. You will find the sample apps for our native SDKs below:


  • Swift 5.

  • iOS 13 and above.

  • Xcode 13 and above.

Getting started

Get started with our user guide for an overview of our core platform and its multiple features, or browse the API reference for fine-grained documentation of all our services.

1. Install the SDK


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

    sudo gem install cocoapods

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

    source ''
    platform :iOS,11.0
    target ‘YourAppdo
      pod 'ComplyCubeMobileSDK',

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

<string>Used to capture facials biometrics and documents</string>
  1. NSMicrophoneUsageDescription

<string>Used to capture video biometrics</string>

2. Create a client

Before launching the SDK, your app must first create a client using the ComplyCube API.

A client represents the individual you need to perform identity verification checks on. This must be done on your mobile app backend server, not the mobile app itself.

Example request

curl -X POST \
     -H 'Authorization: <YOUR_API_KEY>' \
     -H 'Content-Type: application/json' \
     -d '{
          "type": "person",
          "email": "",
               "firstName": "John",
               "lastName" :"Doe"

Example response

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

  "id": "5eb04fcd0f3e360008035eb1",
  "type": "person",
  "email": "",
  "personDetails": {
    "firstName": "John",
    "lastName": "Doe"
  "createdAt": "2023-01-01T17:24:29.146Z",
  "updatedAt": "2023-01-01T17:24:29.146Z"

3. Generate an SDK token

SDK Tokens enable clients to send personal data securely from your mobile app to ComplyCube. Learn more about our SDK Token endpoint.

You must generate a new token each time you initialize the ComplyCube Mobile SDK.

Example request

curl -X POST \
     -H 'Authorization: <YOUR_API_KEY>' \
     -H 'Content-Type: application/json' \
     -d '{
           "appId": "com.complycube.SampleApp"

Example response

  "token": "<CLIENT_TOKEN>"

4. Prepare the stages

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

let documentStage = DocumentStageBuilder()
  .setAllowedDocumentTypes(types: [
  .useLiveCaptureOnly(enable: false)

5. Initialize an SDK flow

You can now initialize a flow by setting the SDK Token, Client ID, and the flow stages. The sequence of stages you specify determines the order in which your client sees those stages.

let sdk = ComplyCubeMobileSDK.FlowBuilder()
  .withStages([documentStage, selfieStage])
  .start(fromVc: self)

var clientAuth = ClientAuth("SDK_TOKEN", "CLIENT_ID")

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

curl -X POST \
     -H 'Authorization: <YOUR_API_KEY>' \
     -H 'Content-Type: application/json' \
     -d '{
            "type": "document_check",

7. Retrieve results

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

All our checks are asynchronous. If you have set up webhooks as described in our webhooks guide, you will be notified once a check completes.

To retrieve the check results, you can perform a get check request.

Example request

curl -X GET{:checkId} \
     -H 'Authorization: <YOUR_API_KEY>' 


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

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

Learn more about our Mobile SDK stages.

let sdk = ComplyCubeMobileSDK.FlowBuilder()
  .start(fromVc: self)

Look and feel

The SDK allows you to set colors to match your existing application or brand. You can customize the colors by setting the relevant values when building your flow.

Learn more about our appearance properties.

Creating a custom appearance

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

let ccLookAndFeel = LookAndFeel()
ccLookAndFeel.primaryButtonBgColor = .green
ccLookAndFeel.uiInterfaceStyle = .dark //can also be .light or .inherited

Applying your custom appearance

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

let sdk = ComplyCubeMobileSDK.FlowBuilder()
  .start(fromVc: self)

Appearance properties

Appearance PropertyDescription


Primary action button background color.


Primary action button pressed background color.


Primary action button text color.


Primary action button border color.


Secondary button background color.


Secondary action button pressed background color.


Secondary action button text color.


Secondary action button border color.


Document type selection button color.


Document type selection button border color.


Document type selection title text color.


Document type selection description text color.


Document type selection icon color.


Screen body text color.


Links color.


Title heading text color.


Subheading text color.


Information panel title color.


Information panel description text color.


Information panel background color.


Information panel icon color.


Error panel title color.


Error panel description text color.


Error panel background color.


Error panel icon color.


Camera capture button background color.


Set the SDK to use dark mode, light mode, or system Inherited.


The SDK provides the following international language support:

  • Arabic - ar 🇦🇪

  • Dutch - nl 🇳🇱

  • English - en 🇺🇸

  • French - fr 🇫🇷

  • German - de 🇩🇪

  • Hindi - hi 🇮🇳

  • Italian - it 🇮🇹

  • Norwegian - no 🇳🇴

  • Polish - po 🇵🇱

  • Portuguese - pt 🇵🇹

  • Spanish - es 🇪🇸

  • Swedish - sv 🇸🇪

  • Chinese (Simplified) - zh 🇨🇳

Result handling

To handle results you must implement the success, cancelled or error callbacks.

Upon an "on success" callback, you can initiate check requests directly from your mobile app backend server. This can be done using the IDs of the uploaded resources, returned in the result parameter.

extension ViewController: ComplyCubeMobileSDKDelegate {
  func onSuccess(_ result: ComplyCubeResult) {
    Handling successful results:
    Our default flow includes three components: an Identity Document,
    a Selfie (Live Photo), and a Proof of Address. Upon successful 
    completion, the 'result' parameter will contain `documentIds`and `livePhotoId`
    print("The flow has completed - here are the ID's returned")
  func onError(_ error: ComplyCubeError) {
    // Handle errors
    print("An error has occurred")

  func onCancelled(_ error: ComplyCubeError) {
    // Handle cancellations
    print("The user has cancelled the flow or not accepted the terms")