Initialization

This section contains the necessary methods to init BiometridOn.

In order to use any of the SDK functionalities, the application needs to initialize it first, using the credentials provided during the enrollment on our platform (see prerequisites section above).

BiometridStandard.getInstance().initialize(url: BIOMETRIDSTANDARD_SERVER_URL, app: BIOMETRIDSTANDARD_API_APP, credential: BIOMETRIDSTANDARD_API_CREDENTIAL, language: Language?, customHeaders: [String: String]?, callback: self)

Parameter

Description

url: String

App credential provided

app: String

Credential provided

credential: String

URL credential provided

language: Language?

Language enum

customHeaders: [String: String]?

Custom headers

sentryDNS: String?

DNS for Sentry, if null or empty not used.

callback: InitializationCallback

callback

Customization:

In case user need to customize the view of SDK, we provide a setter to change the customization parameter.

BiometridStandard.getInstance().setCustomization(customization)

Process Id:

In case user need to change the process id, we provide a setter to change the id of the current process.

BiometridStandard.getInstance().setRelateProcessId(id)

Implementation example

import UIKit
import BiometridStandard

class ViewController: UIViewController, InitializationCallback {

    let BIOMETRIDSTANDARD_SERVER_URL = "https://biometrid.com/"
    let BIOMETRIDSTANDARD_API_APP = "375edc52-d2cd-31d6-b353-iu3yd2c789"
    let BIOMETRIDSTANDARD_API_CREDENTIAL = "e8564df-aea7-11e7-b283-04012a0b9901"

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
        let customHeaders = ["testing": "test"]
        
       BiometridStandard.getInstance().initialize(
           url: BIOMETRIDSTANDARD_SERVER_URL, 
           app: BIOMETRIDSTANDARD_API_APP, 
           credential: BIOMETRIDSTANDARD_API_CREDENTIAL, 
           language: .English, 
           customHeaders: customHeaders, 
           callback: self)
    }
    
    func initializeCallback(status: Bool, error: Errors?) {
        print("status init", status)
        if error != nil {
            print(error)
            return
        }
    }
}

Callback params

Parameter

Description

status: Bool

Method request status

error: Errors?

Errors associated enum

Was this helpful?