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

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 with a picture or

2) Using LiveSelfies

In the first option, Andia makes a comparison of the photo ID against the Selfie that is taken during on-boarding.

In the second option, a Selfie is taken when the user is registered and their biometrics are saved for future validations.

Validations

In addition to onboarding, when users use their selfies for transaction or account authorizations, those selfies are then validated to confirm the user is in front of the device. This is an important step that protects against fraudulent selfies.

Selfie on-boarding

The first step is the creation of a unique identifer for the user. Andia SDK will create a userId that will be used in all future validations user Selfies.

To generate a userId on a new customer, Andia will do a on-boarding call to the SDK, with either one of the following options: 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 against a registered customer userID, we first need a registered customer. Then we can call on 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

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)
  }
}

Last updated