iOS SDK

Andia InApp validation SDK for iOS

Requirements

  • iOS 11.0

  • XCode 10

Download & Install the SDK

Download the AndiaSDK zip from this Github link

Unzip the Folder AndiaSDK.zip

$unzip AndiaSDK.zip

Copy the file Selfie.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
}

Call a 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

//Example of onBoarding call
// Call the SelfieValidator inside your UIViewController code
let selfie = SelfieValidator()
let apiKey = "ExampleAPIKEY" //Get your own API KEY in Andia site.
let viewController = selfie.doOnboarding(apiKey: apiKey, delegateController: self)
present(viewController, animated: true, completion: nil)

Call a 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)

Callback

Getting the response from the Validation & On-boarding is through the implementation of the methods of LiveViewControllerDelegate protocol.

func resultLiveValidation(_ isMatch: Bool?, _ message: String?){
}
//userId is the new identifier for this selfie customer
func resultOnboarding(_ success: Bool?, _ message: String?,_ userId: String?) {
}

Download the example code

Download the example project from this github link