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 SystemChromeFirefoxSafariSamsung InternetOperaEdge

Windows (desktop)

N/A

N/A

Android

N/A

iOS

N/A

MacOS (desktop)

N/A

In general, the SDK supports WebRTC and newer versions of the browsers listed above. Due to compatibility and security reasons, functionality in 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 inside the app, based on the same code project. It is responsible for navigation on websites and web content within 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 function 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 features. You can find an implementation example through our PoCs here.

Compatibility with Hybrid Frameworks


The component is certified 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 will then request the same permission from the native application. It is mandatory for your native application to have the necessary permissions set in the configuration files.

Our support is restricted to applications developed directly on native Android and iOS platforms, using their respective native modules. Currently, we do not offer support for applications developed in hybrid frameworks, such as React Native, Ionic, or other cross-platform development technologies.

Installing the Web SDK


To implement the Unico IDCloud Web SDK into your Android app, follow the steps listed below:

1

Content Security Policy (CSP) Setting

The Web SDK employs the use of Web Workers to enhance security and performance. Therefore, you need to add the following settings 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"
/>

If your application has a CSP, this configuration is mandatory to ensure the correct functioning of the SDK.

2

Obtaining Credentials

  • Contact the CSs and/or Onboarding team.

  • Request the SDK Key by entering 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 receive your SDK Key to implement the AccessBioConfigDataSource.

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>");

Depracated Method:

import { UnicoConfig } from "unico-webframe"

const config = new UnicoConfig();
  .setProjectNumber("<YOUR_PROJECT_NUMBER>");
  .setProjectId("<YOUR_PROJECT_ID>");
  .setMobileSdkAppId("<YOUR_MOBILE_SDK_APP_ID>");
  .setHostname("<YOUR_HOSTNAME>");
  .setHostInfo("<YOUR_HOST_INFO>");
  .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 must download them and include them in your project to perform the life proof capture:

Release do SDKRelease from FaceTec

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 Web SDK, click here.

All additional files must be in a publicly accessible and visible location within your project.

6

Installation

The Web SDK is available through an npm package or cdn. For installation, follow the steps below according to your preference:

Installation via NPM package

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

npm install unico-webframe

Or via yarn, with the following command:

yarn add unico-webframe

Installation via CDN

To install the SDK into 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'

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

Institucional

Sobre nós

Copyright © 2024 unico. All rights reserved