Installation Guide

In this section, you will find all the information needed to install the Unico IDCloud platform SDK in your Web applications


Compatible Browsers


The capture frame provided through the SDK is compatible with the following combinations of browsers and operating systems:

Operational System
Chrome
Firefox
Safari
Samsung Internet
Opera
Edge

Windows (desktop)

N/A

N/A

Android

N/A

iOS

N/A

MacOS (desktop)

N/A

In general, the SDK supports WebRTC and the more recent versions of the browsers listed above. For compatibility and security reasons, functionality on very old versions of these browsers is not guaranteed.

The capture component provided through the Flutter SDK supports versions equal to or higher for the following technologies:

  • Android: 5.0 (API 21);

  • iOS: 11.

Webview Operation


It is a system component that allows Android or iOS applications to display web content directly within the app, based on the same code project. It is responsible for navigation on websites and web content within the apps.

Preconditions


  • It is necessary to have implemented the Web SDK in an application that contains a secure domain with the https protocol.

Compatibility with Operating Systems


Android:


The Web SDK is compatible with webviews running on Android 8 (API 26) or higher.

For the SDK to work correctly, it is necessary to add some permissions and configurations to the AndroidManifest file, which are as follows:

AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.webkit.PermissionRequest" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-feature android:name="android.hardware.camera2.full" />
<uses-feature android:name="android.hardware.camera2.autofocus" />

It is recommended to use Chromium-based webviews with some customizations for better JavaScript performance. You can find an implementation example through our PoCs here.

iOS


The Web SDK is compatible with webviews running on iOS 13 or higher.

For the SDK to function correctly, it is necessary to add some permissions and configurations to the info.plist file, which are as follows:

info.plist
<key>NSCameraUsageDescription</key>
<string>Camera usage description</string>

<key>NSLocationWhenInUseUsageDescription</key>
<string>Mensagem da cliente</string>

iOS provides two ways to use webviews in applications: WKWebView and SFSafariViewController. We recommend using SFSafariViewController for better compatibility with DOM resources. You can find an implementation example through our PoCs here.

Compatibility with Hybrid Frameworks


The component has been approved only for native layers. To be used in hybrid frameworks (Flutter or React Native), it is necessary to implement it in the native layer of Android and/or iOS.

When running, the SDK will request permission to open the camera for the webview, which in turn will request the same permission from the native application. It is mandatory that your native application has the necessary permissions set in the configuration files.

Compatibility with social media webviews


The component has been approved on the Instagram and Facebook social media platforms in Liveness mode without interaction. The Liveness mode with interaction is not compatible with webviews in social media apps.

Installing the Web SDK


To implement the Unico IDCloud Android SDK into your Android application, follow the step-by-step guide below:

1

Content Security Policy (CSP) Setting

The Web SDK uses Web Workers to enhance security and performance. Therefore, it is necessary to add the following configurations to your Content Security Policy (CSP):

<meta
  http-equiv="Content-Security-Policy"
  content="
      script-src 'self' 'unsafe-eval' *.googleapis.com *.acesso.io *.unico.run *.unico.io *.unico.app; 
      worker-src 'self' blob:; 
      child-src 'self' blob:;
            style-src 'self' 'unsafe-inline' *.googleapis.com *.acesso.io *.unico.run *.unico.io *.unico.app;
            font-src 'self' https://fonts.gstatic.com *.acesso.io *.unico.run *.unico.io *.unico.app;
            img-src 'self' data: blob: *.acesso.io *.unico.run *.unico.io *.unico.app;
            media-src 'self' data: *.acesso.io *.unico.run *.unico.io *.unico.app;
      script-src-elem 'self' 'unsafe-inline' blob: *.googleapis.com *.acesso.io *.unico.run *.unico.io *.unico.app"
/>

2

Obtaining Credentials

  • Contact the CSs and/or Onboarding team.

  • Request the SDK Key by providing the identifiers of your applications. Bundle Identifier for iOS, PackageID for Android, and Host for WEB.

  • The identifiers of your applications will be linked to the SDK Key by the Unico team.

  • You will receive your SDK Key to implement the UnicoConfig.

3

Embedding the Credentials in Your Project

  • Implement the UnicoConfig class in your class:

import { UnicoConfig } from "unico-webframe"

const config = new UnicoConfig()
  .setHostname("<YOUR_HOSTNAME>")
  .setHostKey("<YOUR_HOST_KEY>");

4

Embedding Other Files in Your Project

The table below lists additional resource files available for inclusion in your project. You should download them and include them in your project to perform Liveness capture:

Release do SDK
Release from FaceTec

3.18.10

3.18.9

3.18.8

3.18.7

3.18.6

3.18.5

3.18.4

3.18.0 -> 3.18.3

3.16.4 -> 3.17.0

3.16.3

3.16.2

3.14.1 -> 3.16.1

3.11.1 -> 3.14.0

3.10.2 -> 3.11.0

3.10.1

3.9.1 -> 3.10.0

3.9.0

3.8.3

3.8.2

3.8.0 -> 3.8.1

3.7.1 -> 3.7.2

3.6.5 -> 3.7.0

3.6.3 -> 3.6.4

3.6.1 -> 3.6.2

3.5.4 -> 3.6.0

3.5.3

3.5.0 -> 3.5.2

5

Download the AI files for the SDK

To download the AI file for the Unico Check SDK Web, click here.

6

Installation

The Web SDK is provided through an npm package or CDN. To install it, follow the steps below according to your preference:

Installation via NPM package

To install the SDK in your project via npm, simply run the following command:

npm install unico-webframe

Or via yarn, with the command below:

yarn add unico-webframe

Installation via CDN

To install the SDK in your project through the CDN, simply download the file below and import it into your project.

7

Importing

After installing the SDK, simply import it correctly into your project.

If you installed the package via npm:

import { UnicoCheckBuilder, SelfieCameraTypes, UnicoThemeBuilder, DocumentCameraTypes, UnicoConfig, LocaleTypes } from 'unico-webframe'

If you installed the package via cdn:

import { UnicoCheckBuilder, SelfieCameraTypes, UnicoThemeBuilder, DocumentCameraTypes, UnicoConfig, LocaleTypes } from 'UnicoCheckBuilder.min.js'

Done. Once the SDK installation is complete, proceed to the implementation by reading the following usage and integration guide:


Still need help?

Didn't find something or still need help? If you're already a client or partner, you can reach out through our Help Center.

Atualizado

Isto foi útil?