Selfie Capture captures the user’s self image (selfie) for facial verification or any other purposes after verifying the user’s physical presence in front of the device camera.

The capture flow supports verification for two pairs of expressions:

Ensure that you have added the UI library and other dependencies to your project. See Add the dependencies needed for your application for more information.

Using SelfieCaptureViewController

Initialize the SelfieCaptureViewController.Builder with a completion block to receive the completion events with result. For example:

class YourViewController: UIViewController {
    override func viewDidAppear() {
        do {
          try SelfieCaptureViewController.Builder() 
             { (isComplete, selfie) in
                if (isComplete) {
                  let selfieImage: UIImage?  = selfie?.getSelfie()
                } else {
                   //Cancel action
                 // set to false to skip expression check
              .start(parentViewController: self)
        } catch {
          // Handle errors thrown by builder here

Configurable UI components

To modify the color scheme and other assets in the viewController, you can override the following resources in the app.