@interface ExampleViewController: UIViewController <AuthenteqFaceAuthenticationDelegate>
@implementation ExampleViewController
- (void)faceAuthentication {
FaceAuthenticationParams *params =
[[FaceAuthenticationParams alloc] initWithClientId:@"<YOUR CLIENT ID>"
clientSecret:@"<YOUR CLIENT SECRET>"
verificationId:_verificationId];
UIViewController *viewController =
[[AuthenteqFlow instance] faceAuthenticationViewControllerWith:params
viewController.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentViewController:viewController animated:true completion:nil];
#pragma MARK - AuthenteqFaceAuthenticationDelegate
- (void)authenteqDidFinishFaceAuthenticationWith:(nonnull NSString *)code {
[self.presentedViewController dismissViewControllerAnimated:true completion:nil];
NSLog(@"Did finish face authentication with code:\n%@", code);
// Check face authentication result with the CODE provided
- (void)authenteqDidFailFaceAuthenticationWith:(enum AuthenteqFlowError)error {
[self.presentedViewController dismissViewControllerAnimated:true completion:nil];
NSLog(@"Did finish face authentication with error: %ld", (long) error);