Skip to main content

Get started

This page demonstrates how to configure your account to use the SDK, as well as how to install and configure it in your project.

Before you begin

Before you start, make sure that your development environment meets the following requirements:

  • XCode 15.0.1 or higher;
  • iOS SDK version 11 higher;

If you are using swift in your project:

  • Swift CI Compiler > 5.4.2
  • Swift Syntax > 4.2

Configure and install the SDK

Install the SDK using CocoaPods or Swift Package Manager (SPM)

Using o CocoaPods

Installation

CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. To detailed usage instructions, check the official documentation from cocoapods. To integrate the SDK in your XCode project using CocoaPods, follow the steps below:

Include the following line ´unicocheck-ios´ in your Podfile:

pod ‘unicocheck-ios’

Then, use the following command in your terminal to install the dependencies:

pod install --repo-update

Using o Swift Package Manager (SPM)

The Swift Package Manager is a tool for managing the distribution of Swift code. It's integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies. To integrate the SDK in your project using SPM, you just need to include the dependency in your file Package.swift:

Package.swift
dependencies: [
.package(url: "https://github.com/acesso-io/unico-check-ios.git", .upToNextMajor(from: "2.12.0"))
]

Declare app permissions

In order to use user's camera, include the following user permissions in your app:

<key>NSCameraUsageDescription</key>
<string>Camera usage description</string>
Be careful

If you are executing the project in .xcodeproj, it's necessary to open the project in .xcworkspace!

Configure your credentials

To use the SDK, you need to get valid credential keys. The following steps show you how to get these client keys and configure it in your project:

Get your credentials

To use the iOS SDK you need to obtain the SDK Key credential, a unique customer identification key generated by the Unico team.

  1. contact the CSs and/or Onboarding team.
  2. Request the SDK Key by entering the identifiers of your applications. Bundle Identifier for iOS, PackageID for Android and Host for WEB.
  3. The identifiers of your applications will be linked to the SDK Key by the Unico team.
  4. You receive your SDK Key to implement the AccessBioConfigDataSource.
Credentials (Client API Key) - Deprecated Method

To import the credentials (Client API Key) into your project, use the following guide:

  1. Log in to the Unico Customer Area;
  2. Go to Configurações (Configurations), then Integração (Integrations) and finally to API Key;
  3. Generate or edit an existing API Key;
  4. If you want to use the Smartlive with interaction functionality in your app, check if the field "Utiliza liveness com interação" is enabled (this field must be showing you the word "SIM"). Otherwise, contact the support team to request the activation.
Smartlive with interaction

Learn more about Smartlive with interaction in the key concepts section.

  1. Select SIM (Yes) in the field "Utiliza autenticação segura na SDK" (Asking if use secure authentication in SDK);
  2. Expand the Android SDK section and add your SDK application name and Bundle ID;
  3. Save your changes.

Add the credentials to your app

  1. Log in to your Customer Area;
  2. Go to Configurações (Configurations), then Integração (Integrations) and finally to API Key;
  3. Select the Download option on the desired API Key;
  4. Select the Android option;
  5. Click on "Gerar" (Generate) and a new tab opens in your browser containing project information in JSON format.
Problems with pop-up blockers

You may need to temporarily disable your pop-up blocker to see the download window.

Implementing the interface AcessoBioConfigDataSource

To add the SDK Key to the project, implement the AccessBioConfigDataSource protocol in your class.

.h:
#import <AcessoBio/AcessoBioManager.h>
#import <AcessoBio/AcessoBio-Swift.h>

@interface YourUnicoConfigClass: AcessoBioConfigDataSource {}
@end

.m:
@implementation YourUnicoConfigClass

- (NSString * _Nonnull)getBundleIdentifier {
return @"<YOUR_MOBILE_BUNDLE_IDENTIFIER>";
}

- (NSString * _Nonnull)getHostKey {
return @"<YOUR_SDK_KEY>";
}

@end
Credentials (Client API Key) - Deprecated Method

.h:
#import <AcessoBio/AcessoBioManager.h>
#import <AcessoBio/AcessoBio-Swift.h>

@interface YourUnicoConfigClass : AcessoBioConfigDataSource {}

@end

.m:
@implementation YourUnicoConfigClass

- (NSString * _Nonnull)getBundleIdentifier {
return @"<YOUR_MOBILE_BUNDLE_IDENTIFIER>"
}

- (NSString * _Nonnull)getHostInfo {
return @"<YOUR_HOST_INFO>"
}

- (NSString * _Nonnull)getHostKey {
return @"<YOUR_HOST_KEY>"
}

- (NSString * _Nonnull)getMobileSdkAppId {
return @"<YOUR_MOBILE_SDK_APP_ID>"
}

- (NSString * _Nonnull)getProjectId {
return @"<YOUR_PROJECT_ID>"
}

- (NSString * _Nonnull)getProjectNumber {
return @"<YOUR_PROJECT_NUMBER>"
}

@end

Getting help

Are you missing something or still need help? Please, please get in touch with the support team at help center.

Next steps