Skip to main content

Import the YesidFaceAuthentication module:

In your project's Swift file where you want to use the YesidFaceAuthentication library, add the following import statement:

import FaceAuthFramework

Instantiate and present the FaceAuthenticationCameraUI view:

Configure the SDK by passing the license or anyother configuration

let configuration: FaceAuthConfigurationBuilder = FaceAuthConfigurationBuilder().setUserLicense(userLicense: "YOUR_LICENSE")

Use the SDK by calling FaceAuthenCameraUI

@main
struct iOSApp: App {
let configuration: FaceAuthConfigurationBuilder = FaceAuthConfigurationBuilder().setUserLicense(userLicense: "YOUR_LICENSE")
@State var authenticatedFace: UIImage? = UIImage()
var body: some Scene {
WindowGroup {
FaceAuthCameraUI(
configurationBuilder: configuration,
firstImage: UIImage(),
secondImage: UIImage(),
onMatchResultsFirstImage: {
FaceMatchResults in
print("\(FaceMatchResults")

}, onMatchResultsSecondImage: {
FaceMatchResults in
print("\(FaceMatchResults")
},
authenticatedFace: self.$authenticatedFace
)
}
}
}