Biometric KYC is exposed as a flow which performs the following high level steps:
import SwiftUI
import SmileID
struct MyView: View, BiometricKycResultDelegate {
@State private var idInfo: IdInfo
var body: some View {
ZStack {
SmileID.biometricKycScreen(
idInfo: idInfo,
delegate: self
)
}
}
func didSucceed(selfieImage: URL, livenessImages: [URL], jobStatusResponse: BiometricKycJobStatusResponse) {
print("Successfully submitted Biometric KYC job")
}
func didError(error: Error) {
print("An error occurred - \(error.localizedDescription)")
}
}
let biometricKycScreen = SmileID.biometricKycScreen(...)
let controller = UIHostingController(rootView: biometricKycScreen)
controller.modalPresentationStyle = .fullScreen
navigationController?.present(controller, animated: true)