SessionDelegate

@objc
public protocol SessionDelegate

Session delegate protocol

  • Called when session finishes

    Declaration

    Swift

    func session(_ session: Session, didFinishWithResult result: VerIDSessionResult)

    Parameters

    session

    Session that finished

    result

    Session result

  • Called when face detection result is produced from an image/camera frame

    Implement this method to get a callback after every face detection run. For example, this may be useful to draw the detected face over camera preview.

    Declaration

    Swift

    @objc
    optional func session(_ session: Session, didProduceFaceDetectionResult result: FaceDetectionResult)

    Parameters

    session

    Session that produced the face detection result

    result

    Face detection result

  • Called when the session produces a face capture

    Face captures are produced from face detection results when the face is aligned with the requested bearing.

    Declaration

    Swift

    @objc
    optional func session(_ session: Session, didProduceFaceCapture faceCapture: FaceCapture)

    Parameters

    session

    Session that produced the face capture

    faceCapture

    Face capture