Camera
This section contains the necessary knowledge to understand the start camera in BiometridStandard.
BiometridStandard.getInstance().startCamera(cameraCallback: self, viewController: self, options: options)
Parameter
Description
viewController: UIViewController
View Controller to open the camera screen
options: CameraOptions?
Options to change customization of screen
callback: ProcessCallback?
callback
Implementation example
import UIKit
import BiometridStandardSDK
class ViewController: UIViewController, ProcessCallback {
override func viewDidLoad() {
super.viewDidLoad()
}
@IBAction func startCameraBtn(_ sender: Any) {
let options = CameraOptions()
BiometridStandard.getInstance().startCamera(viewController: self, options: options, callback: self)
}
func cameraCallback(image: String?, error: Errors?) {
if error != nil {
print(error?.rawValue)
return
}
print("result", image)
}
}
Callback params
Parameter
Description
image: String
Image in base64
errors: Errors
Errors associated enum
Was this helpful?