iOS SDK

Andia InApp validation SDK for iOS

Requirements

  • iOS 11.0

  • XCode 10

Download SDK & the example project

Download from this Github link

Using the SDK in a new Project

Unzip the file SelfieSDK.framework.zip (Selfie Framework)

$unzip SelfieSDK.framework.zip

Copy the file SelfieSDK.framework into your iOS project in XCode

Drag inside yours frameworks
Ensure that is inside Emdded Binaries
Also in Linked Frameworks

Import the Framework in your ViewController

//Import the framework
import SelfieSDK
// Implement LiveViewControllerDelegate protocol.
class myViewController: UIViewController, LiveViewControllerDelegate {
//View Controller Code
}

How to use

Onboarding

They are 2 ways to onboard users, 1) Using an official ID whit a picture, or 2) Using LiveSelfies.

In the first Andia makes a comparison of the photo of the ID against a Selfie that is taken in the moment of the on-boarding.

In the second one, when the user is registered, a Selfie is taken to save their biometrics for future validations.

Validations

When a user's onboarding has been performed, later when it is necessary to validate that the user is in front of the device (Account Recovery, validate a high risk transactions, etc). You just have to call the validation method with the UserID generated in the onboarding previously.

Selfie on-boarding

In order to do Selfie Validations with a customer, Andia SDK first need to create a userId identifier, to use this in future validations agains the customer.

To generate a new userId on a new customer we need to do a on-boarding call to the SDK, they are 2 options via Selfie or picture of an official ID

//Example of Selfie on-boarding call
// Call the doSelfieOnboarding inside of your UIViewController, inside an IBAction by example
let apiKey = "ExampleAPIKEY" //Get your own API KEY in Andia site.
let selfie = SelfieValidator()
let viewController = selfie.doSelfieOnboarding(apiKey: apiKey, delegateController: self)
present(viewController, animated: true, completion: nil)

Document on-boarding (Photo of an official ID)

//Example of Document on-boarding call
// Call the doDocumentOnboarding inside of your UIViewController, inside an IBAction by example
let apiKey = "ExampleAPIKEY" //Get your own API KEY in Andia site.
let selfie = SelfieValidator()
let viewController = selfie.doDocumentOnboarding(apiKey: apiKey, delegateController: self)
present(viewController, animated: true, completion: nil)

Selfie Validation

To perform a Selfie Validation agains a register customer userID, we first need a registered customer. Then we can call the SDK to perform a Selfie Validation.

//Example of Validation call
let selfie = SelfieValidator()
let apiKey = "ExampleAPIKEY" //Get your own API KEY in Andia site.
let viewController = selfie.doValidation(userId: userId!, apiKey: apiKey, delegateController: self)
present(viewController, animated: true, completion: nil)

Callbacks

to get the response from the SDK & On-boarding is through the implementation of the methods of LiveViewControllerDelegate protocol.

func resultLiveValidation(_ isMatch: Bool?, _ message: String?){
//your code here
}
func resultDocumentOnboarding(_ success: Bool?, _ message: String?,_ userId: String?, _ ocr: String?) {
//your code here
}
func resultSelfieOnboarding(_ success: Bool?, _ message: String?,_ userId: String?) {
//your code here
}
//required when the resultDocumentOnboarding is maded
func resultDocumentOcr(_ success: Bool?, _ nextController: UIViewController?) {
if (success!){
present(nextController!, animated: true, completion: nil)
}
}