Get Step State
This section contains the necessary methods to get selected step state.
You have 2 options to get step state:
CurrentStep
CompletedSteps
BiometridStandard.getInstance().getStepState(processId: processId, state: StepState, callback: self)
Example:
//Current step
BiometridStandard.getInstance().getStepState(processId: processId, state: .CurrentStep, callback: self)
//Completed steps
BiometridStandard.getInstance().getStepState(processId: processId, state: .CompletedSteps, callback: self)
Parameter
Description
processId: String
Process id
state: StepState
StepState enum
callback: ProcessCallback
callback
Implementation example
import UIKit
import BiometridStandard
class ViewController: UIViewController, ProcessCallback {
let processId = "nodkthhdhdhdd"
override func viewDidLoad() {
super.viewDidLoad()
}
@IBAction func getStepStateBtn(_ sender: Any) {
BiometridStandard.getInstance().getStepState(processId: processId, state: .CompletedSteps, callback: self)
}
func getStepStateCallback(status: Bool, response: String?, error: Errors?) {
print("status get step state", status)
if error != nil {
print(error?.rawValue)
return
}
print("response getStepState", response)
}
}
Callback params
Parameter
Description
status: Bool
Method request status
response: String?
All the response from the api
error: Errors?
Errors associated enum
Was this helpful?