Installation Guide

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


Development Environment Preconditions


Ensure your development environment meets the following preconditions:

  • Xcode version 15.0.1 or later (Apple’s official IDE);

  • iOS SDK version 11 or later;

  • PocoaPods or Swift Package Manager dependency manager configured.

The capture component provided by the iOS SDK is compatible with all devices running iOS 11 or later. You can check the list of compatible devices on Apple’s official support channels.

Installing the iOS SDK


To integrate the Unico IDCloud iOS SDK into your iOS app, follow the steps below:

1

Using CocoaPods

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, refer to the official CocoaPods documentation. To integrate the iOS SDK into your Xcode project with CocoaPods, follow these steps:

Add unicocheck-ios to your Podfile:

podfile
pod ‘unicocheck-ios’

Run the following command in your terminal to install the dependencies:

pod install

If you are running the project in .xcodeproj, you must open it in .xcworkspace.

2

Using Swift Package Manager (SPM)

Swift Package Manager is a dependency manager for Swift projects. It integrates with the Swift build system to automate the downloading, compiling, and linking of dependencies. To integrate the iOS SDK into your project with SPM, follow these steps:

Add the dependency to your Package.swift file:

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

3

Camera Usage Permissions

To use the camera-opening method in your project, add the necessary permissions before compiling your application:

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

4

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.

5

Embedding the Credentials in Your Project

  • Implement the AcessoBioConfigDataSource 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
Deprecated Method - Objective-C
.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
Deprecated Method - Swift
import AcessoBio

class YourUnicoConfigClass: AcessoBioConfigDataSource {
        
    func getProjectNumber() -> String {
        return "<YOUR_PROJECT_NUMBER>"
    }
    
    func getProjectId() -> String {
        return "<YOUR_PROJECT_ID>"
    }
    
    func getMobileSdkAppId() -> String {
        return "<YOUR_MOBILE_SDK_APP_ID>"
    }
    
    func getBundleIdentifier() -> String {
        eturn "<YOUR_MOBILE_BUNDLE_IDENTIFIER>"
    }
    
    func getHostInfo() -> String {
        return "<YOUR_HOST_INFO>"
    }
    
    func getHostKey() -> String {
        return "<YOUR_HOST_KEY>"
    }
}

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