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 frameworkimportSelfieSDK// Implement LiveViewControllerDelegate protocol.classmyViewController: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 examplelet 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 examplelet 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 calllet 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.
funcresultLiveValidation(_isMatch: Bool?, _message: String?){//your code here }funcresultDocumentOnboarding(_success: Bool?, _message: String?,_userId: String?, _ocr: String?) {//your code here}funcresultSelfieOnboarding(_success: Bool?, _message: String?,_userId: String?) { //your code here}//required when the resultDocumentOnboarding is maded funcresultDocumentOcr(_success: Bool?, _nextController: UIViewController?) {if(success!){present(nextController!, animated:true, completion:nil) }}