AnylineFaceAuthentication pairs identity document scanning with a real-time liveness check utilizing the iPhone's camera, best suited for authenticating users over the internet.

Overview

AnylineFaceAuthentication

AnylineFaceAuthentication pairs identity document scanning with a real-time liveness check utilizing the iPhone's camera, best suited for authenticating users over the internet.

Suitable IDs include passports, national IDs, as well as some supported driving licenses (TODO: show a full list of supported identity documents).

NOTE: An internet connection is required in order to use face authentication. (TODO: explain how data sent is captured and used).

How to use

This section shows how to set up and use AnylineFaceAuthentication for your iOS app.

You will need the following keys: Anyline License Key, and Anyline Facescan Encryption Key (TODO: find the directions for obtaining the keys).

First, build the AnylineFaceAuthentication and FaceTecSDK frameworks.

make all

The frameworks can be found in: ... TODO: give the locations of the xcframework files.

Add both .xcframework files, as well as Anyline.xcframework (TODO: link to the directions) to your iOS project.

(TODO: make a Cocoapod of AnylineFaceAuthentication.)

On the view controller where you would want the face authentication flow to take place, make the following imports:

#import 
   
    
#import 
    

    
   

Then on viewDidLoad, initialize AnylineFaceAuthenticationSDK using the Anyline license key and encryption key. If the completion block returns successfully, obtain an instance of FaceAuthenticationViewController using AnylineFaceAuthenticationSDK createViewControllerWithDelegate:, and add it as a child to this view controller:

[[AnylineFaceAuthenticationSDK sdk] setupProdModeWithAnylineLicenseKey:kAnylineLicenseKey
                                                        encryptionKey:kFaceScanEncryptionKey
                                                 faceTecLicenseString:nil
                                                          endpointUrl:nil
                                                           completion:^(BOOL success, NSError * _Nullable error) {

  if (error) {
    /* ... */
    return;
  }

  UIViewController *faceAuthVC = [[AnylineFaceAuthenticationSDK sdk]
    createViewControllerWithDelegate:self];

  [self addChildViewController:faceAuthVC];
  [self.view addSubview:faceAuthVC.view];
  [faceAuthVC didMoveToParentViewController:self];
}];

Then, implement FaceAuthenticationDelegate for the view controller:

- (void)faceAuthenticationController:(FaceAuthenticationViewController *)faceAuthenticationViewController
                  completedWithError:(NSError *)error {
  // handle error
}

- (void)faceAuthenticationController:(FaceAuthenticationViewController * _Nonnull)faceAuthenticationController
         completedWithLivenessResult:(id
   
     _Nonnull)completedWithLivenessResult
                          scanResult:(ALIDResult
    
      * _Nonnull)scanResult
                          matchLevel:(enum MatchLevel)matchLevel {
    
    NSString *matchString = [[self class] matchStringForLevel:matchLevel];
    ALUniversalIDIdentification *identification = (ALUniversalIDIdentification *)scanResult.result;
    // ...
}

    
   

From -[faceAuthenticationController:completedWithLivenessResult:scanResult:matchLevel:], identification returns the scanned information from the identification document presented during the authentication process, and matchLevel gives you an accuracy level for the face scan using the photo from the identification document as reference.

The match levels can be read as follows:

  • Match Level1 - 99% match
  • Match Level2 - 99.6% match
  • Match Level3 - 99.8% match
  • Match Level4 - 99.9% match
  • Match Level5 - 99.99% match
  • Match Level6 - 99.999% match
  • Match Level7 - 99.9998% match
  • Match Failed - No match detected

(Also check the demo app for usage examples.)

You might also like...
Kanvas is an open-source iOS library for adding effects, drawings, text, stickers, and making GIFs from existing media or the camera.
Kanvas is an open-source iOS library for adding effects, drawings, text, stickers, and making GIFs from existing media or the camera.

Kanvas Kanvas is an open-source iOS library for adding effects, drawings, text, stickers, and making GIFs from existing media or the camera.

Extract opening hours tags from a camera image

OpeningHoursPhoto Extract opening hours tags from a camera image This project is no longer active. The latest development is taking part as part of Go

Swifttty and easy camera framework for iOS.
Swifttty and easy camera framework for iOS.

SwiftttCamera Swifttty and easy camera framework for iOS. View Demo · Report Bug · Request Feature SwiftttCamera is a wrapper around AVFoundation that

📸 A wrapper for AVCaptureSession - The way easier to use the Camera.

Capturer A wrapper for AVCaptureSession - The way easier to use the Camera. Setting up let captureBody = CaptureBody( configuration: .init { $0.

Instant camera hybrid with multiple effects and filters written in Swift.
Instant camera hybrid with multiple effects and filters written in Swift.

Kontax Cam Download on the app store! No longer on the app store Kontax Cam is an instant camera built 100% using Swift for iOS. You can take your pho

Simple camera application for iOS that uploads pictures to WebDAV server or Dropbox quickly. Available on the AppStore.
Simple camera application for iOS that uploads pictures to WebDAV server or Dropbox quickly. Available on the AppStore.

Upupu Simple camera application for iOS that uploads pictures to WebDAV server or Dropbox quickly. Also available on the AppStore. Features Easy and f

Custom iOS camera and photo picker with editing capabilities
Custom iOS camera and photo picker with editing capabilities

Overview Paparazzo is a component for picking and editing photos. Key Features 📷 Taking photos using camera 📱 Picking photos from user's photo libra

ImagePicker : an all-in-one camera solution for your iOS app
ImagePicker : an all-in-one camera solution for your iOS app

Description ImagePicker is an all-in-one camera solution for your iOS app. It lets your users select images from the library and take pictures at the

The camera shoot a photo when animals apear in the frame
The camera shoot a photo when animals apear in the frame

AutoCatDogCam The camera shoot a photo when animals apear in the frame. How to u

Releases(2.0.0)
Owner
null
Utilizing Apple's Vision Framework to center faces in CGImage.

FaceCrop CGImage extension that utilizes Apple's Vision Framework to detect and center faces. Usage cgImage.faceCrop { [weak self] result in switc

Ancestry.com 40 Nov 24, 2022
ImagePicker - selecting images from the photo albums, with allowed permissions /on real device accesing the camera

ImagePicker - selecting images from the photo albums, with allowed permissions /on real device accesing the camera, permission also needed/after picking an image it has the possibility to rename it

Pavel Surový 0 Jan 26, 2022
Vision Camera 📸 The Camera library that sees the vision.

Vision Camera ?? The Camera library that sees the vision. npm i react-native-vision-camera npx pod-install Documentation Guides API Ex

Marc Rousavy 3.5k Jan 5, 2023
PublisherKit - An open source implementation of Apple's Combine framework for processing asynchronous events over time

Publisher Kit Overview PublisherKit provides a declarative Swift API for processing asynchronous events over time. It is an open source version of App

null 5 Feb 22, 2022
FlaneurImagePicker is an iOS image picker that allows users to pick images from different sources (ex: user's library, user's camera, Instagram...). It's highly customizable.

FlaneurImagePicker is a highly customizable iOS image picker that allows users to pick images from different sources (ex: device's library, device's c

FlaneurApp 17 Feb 2, 2020
An iOS app that helps you check, edit and delete metadata of photos, including but not limited to EXIF, TIFF...

MetaX A simple iOS app that helps you check, edit and delete metadata of photos, including but not limited to EXIF, TIFF... Feature List main metadata

Yuhan Chen 189 Dec 29, 2022
Image picker with custom crop rect for iOS written in Swift (Ported over from GKImagePicker)

WDImagePicker Ever wanted a custom crop area for the UIImagePickerController? Now you can have it with WDImagePicker. Just set your custom crop area a

Wu Di 96 Dec 19, 2022
Xcode plugin that brings ⇧⌘T from AppCode over to Xcode

Aviator An Xcode Plugin that brings ⇧⌘T over to Xcode This minimal plugin allows you to use the key combo ⇧⌘T to toggle between source and test files.

Mark Sands 29 Aug 18, 2018
Flower classifier predicting the names of over 70 different types.

Fløra Lab Table of Contents Project Onboarding Installation Swift Playgrounds iPad Mac Xcode Copyright Project Fløra Lab is a flower classification ap

Lukman Aščić 4 Jun 6, 2022
FlexibleImage is implemented with the hope that anyone could easily develop an app that provides features such as Camera Filter and Theme.

FlexibleImage is implemented with the hope that anyone could easily develop an app that provides features such as Camera Filter and Theme. When you wr

Jungwon An 815 Dec 30, 2022