Skip to main content

Bioidentity Integration in IOS

Trust BioIdentity#

TrustBioidentity is an SDK responsible for providing identity validation through a photograph of a person's fingerprint using the camera of a mobile device

Table of contents#


Implementation#

Easiest way to install TrustBioidentity is by using Cocoapods within just a few steps:

  1. Initialize cocoapods in your project (if it's not already done):
pod init

this would generate a Podfile and Pods folder.

  1. Complete Podfile according to your needs:
platform :ios, '13.0'
# this indicates the source where Cocoapods would find the pod to install
source 'https://gitlab.com/trustchile/movil-libs/lat_trust_mobile_ios_bioidentity_library_podspec'
target 'AppName': do
use_frameworks!
...
# pod name and version to install
pod 'TrustBioIdentity', '~> 2.2.0'
...
end
  1. Finally install previously specified dependencies using:
pod install

Initialize#

Builder#

NameDescriptionDefault ValueOptional
ninDNI of the user-No
countrySpecifies the countryCHLNo
index---
strategyTypeSpecifies the fingerFINGERNo
companyIdSpecifies the id of the company-No
providerSpecifies the provider companyTRUSTNo
clientIdSpecifies the client Id-No
clientSecretSpecifies the client secret-No
transactionIdSpecifies the transaction IdnullYes

Example Builder#

var bioIdentity = TrustBioIdentity.builder
.nin("123456789")
.companyId(1)
.index(2)
.clientId(<YOUR_CLIENT_ID>)
.clientSecret(<YOUR_CLIENT_SECRET>)
.provider(Provider.trust)
.country(Country.chile)
.strategyType(Strategy.finger)
.transactionId("12345")
.build()

Usage#

TrustBioIdentity methods#

Request validation#

This methods allows client application to ask its user for a fingerprint validation by making a picture of its finger.

bioIdentity.requestValidation()

Request enroll#

This methods allows client application to ask its user for a fingerprint enrollment by making a picture of its finger.

bioIdentity.requestEnroll()

Errors#

TrustError definition:

Codes#

Possible errors that can be found when integrating the SDK

CodeValue
0Unknown error
400Bad request
401The request was unauthorized
403The request was forbidden
404The requested could not be found
405Method not allowed
500Internal server error
501Not implemented
502Bad gateway
503Service unavailable
2000Error code bioidentity response
2003Unsupported code bioidentity response
9000Server error
Last updated on by fcaro@trust.lat