SybrinBiometrics

A base class that is the main entry point for the SDK consumer

Declaration

@objc final public class SybrinBiometrics : NSObject {
    @objc public static let shared: SybrinBiometrics
    @objc final public var configuration: SybrinBiometricsConfiguration?
    
    public typealias doneLaunchingType = (Bool, String?) -> Void
    public typealias failureCallbackType = (String) -> Void
    public typealias cancelCallbackType = () -> Void
    public typealias activeLivenessDetectionSuccessCallbackType = (ActiveLivenessDetectionModel) -> Void
    public typealias activePassiveLivenessDetectionSuccessCallbackType = (ActivePassiveLivenessDetectionModel) -> Void
    public typealias passiveLivenessDetectionSuccessCallbackType = (PassiveLivenessDetectionModel) -> Void
    public typealias facialComparisonSuccessCallbackType = (FacialComparisonModel) -> Void
    public typealias loadModelSuccessCallbackType = (FacialRecognitionInitializationModel) -> Void
    public typealias facialTrainingSuccessCallbackType = (FacialTrainingModel) -> Void
    public typealias facialRecognitionSuccessCallbackType = (FacialRecognitionModel) -> Void
    
    @objc final public func changeLogLevel(to logLevel: LogLevel)
    
    @objc final public func openActiveLivenessDetection(
        on viewController: UIViewController, 
        actions: [LivenessDetectionQuestion]? = nil, 
        doneLaunching: SybrinBiometrics.doneLaunchingType? = nil, 
        success: SybrinBiometrics.activeLivenessDetectionSuccessCallbackType? = nil, 
        failure: SybrinBiometrics.failureCallbackType? = nil, 
        cancel: SybrinBiometrics.cancelCallbackType? = nil
    )
    @objc final public func openActivePassiveLivenessDetection(
        on viewController: UIViewController, 
        actions: [LivenessDetectionQuestion]? = nil, 
        doneLaunching: SybrinBiometrics.doneLaunchingType? = nil, 
        success: SybrinBiometrics.activePassiveLivenessDetectionSuccessCallbackType? = nil, 
        failure: SybrinBiometrics.failureCallbackType? = nil, 
        cancel: SybrinBiometrics.cancelCallbackType? = nil
    )
    @objc final public func openPassiveLivenessDetection(
        on viewController: UIViewController, 
        doneLaunching: SybrinBiometrics.doneLaunchingType? = nil, 
        success: SybrinBiometrics.passiveLivenessDetectionSuccessCallbackType? = nil, 
        failure: SybrinBiometrics.failureCallbackType? = nil, 
        cancel: SybrinBiometrics.cancelCallbackType? = nil
    )
    @objc final public func passiveLivenessDetectionFromImage(
        image: UIImage, 
        success: SybrinBiometrics.passiveLivenessDetectionSuccessCallbackType? = nil, 
        failure: SybrinBiometrics.failureCallbackType? = nil
    )
    @objc final public func compareFaces(
        _ target: UIImage, 
        _ faces: [UIImage], 
        success: SybrinBiometrics.facialComparisonSuccessCallbackType? = nil, 
        failure: SybrinBiometrics.failureCallbackType? = nil
    )
    @objc final public func trainFace(
        on viewController: UIViewController, 
        for identifier: String, 
        success: SybrinBiometrics.facialTrainingSuccessCallbackType? = nil, 
        failure: SybrinBiometrics.failureCallbackType? = nil, 
        cancel: SybrinBiometrics.cancelCallbackType? = nil
    )
    @objc final public func loadModel(
        for identifier: String, 
        success: SybrinBiometrics.loadModelSuccessCallbackType? = nil, 
        failure: SybrinBiometrics.failureCallbackType? = nil
    )
    @objc final public func openFacialRecognition(
        on viewController: UIViewController, 
        for identifier: String, 
        doneLaunching: SybrinBiometrics.doneLaunchingType? = nil, 
        success: SybrinBiometrics.facialRecognitionSuccessCallbackType? = nil, 
        failure: SybrinBiometrics.failureCallbackType? = nil, 
        cancel: SybrinBiometrics.cancelCallbackType? = nil
    )
}

Only relevant details are shown, boilerplate or standard Swift generated code is omitted

Summary

Public variables

Name

Type

Description

Contains the configuration that you have set.

Public methods

Signature

Return Type

Description

Void

Attempts to change the log level to the specified level. Some levels are restricted and can only be set by Sybrin developers.

Void

Opens the Sybrin view controller and starts the active liveness detection feature. Read more at Active Liveness Detection.

Void

Opens the Sybrin view controller and starts the active passive liveness detection feature. Read more at Active Passive Liveness Detection.

Void

Opens the Sybrin view controller and starts the passive liveness detection feature. Read more at Passive Liveness Detection.

Void

Executes the passive liveness detection from image feature. Read more at Passive Liveness Detection From Image.

Void

Executes the facial comparison feature. Read more at Facial Comparison.

Void

Executes the facial training feature. Read more at Facial Training.

Void

Executes the load model feature. Read more at Load Model.

Void

Opens the Sybrin view controller and starts the facial recognition feature. Read more at Facial Recognition.

Public variables

configuration

@objc final public var configuration: SybrinBiometricsConfiguration?

It is required that you set this variable before attempting to use any of the Sybrin features. Learn how to Get Started

Contains the configuration that you have set.

Public methods

changeLogLevel(to logLevel: LogLevel)

@objc final public func changeLogLevel(to logLevel: LogLevel)

Attempts to change the log level to the specified level. Some levels are restricted and can only be set by Sybrin developers.

openActiveLivenessDetection

@objc final public func openActiveLivenessDetection( on viewController: UIViewController, actions: [LivenessDetectionQuestion]? = nil, doneLaunching: SybrinBiometrics.doneLaunchingType? = nil, success: SybrinBiometrics.activeLivenessDetectionSuccessCallbackType? = nil, failure: SybrinBiometrics.failureCallbackType? = nil, cancel: SybrinBiometrics.cancelCallbackType? = nil )

Opens the Sybrin view controller and starts the active liveness detection feature. Read more at Active Liveness Detection.

openActivePassiveLivenessDetection

@objc final public func openActivePassiveLivenessDetection( on viewController: UIViewController, actions: [LivenessDetectionQuestion]? = nil, doneLaunching: SybrinBiometrics.doneLaunchingType? = nil, success: SybrinBiometrics.activePassiveLivenessDetectionSuccessCallbackType? = nil, failure: SybrinBiometrics.failureCallbackType? = nil, cancel: SybrinBiometrics.cancelCallbackType? = nil )

Opens the Sybrin view controller and starts the active passive liveness detection feature. Read more at Active Passive Liveness Detection.

openPassiveLivenessDetection

@objc final public func openPassiveLivenessDetection( on viewController: UIViewController, doneLaunching: SybrinBiometrics.doneLaunchingType? = nil, success: SybrinBiometrics.passiveLivenessDetectionSuccessCallbackType? = nil, failure: SybrinBiometrics.failureCallbackType? = nil, cancel: SybrinBiometrics.cancelCallbackType? = nil )

Opens the Sybrin view controller and starts the passive liveness detection feature. Read more at Passive Liveness Detection.

passiveLivenessDetectionFromImage

@objc final public func passiveLivenessDetectionFromImage( image: UIImage, success: SybrinBiometrics.passiveLivenessDetectionSuccessCallbackType? = nil, failure: SybrinBiometrics.failureCallbackType? = nil )

Executes the passive liveness detection from image feature. Read more at Passive Liveness Detection From Image.

compareFaces

@objc final public func compareFaces( target: UIImage, faces: [UIImage], success: SybrinBiometrics.facialComparisonSuccessCallbackType? = nil, failure: SybrinBiometrics.failureCallbackType? = nil )

Executes the facial comparison feature. Read more at Facial Comparison.

trainFace

@objc final public func trainFace( on viewController: UIViewController, for identifier: String, success: SybrinBiometrics.facialTrainingSuccessCallbackType? = nil, failure: SybrinBiometrics.failureCallbackType? = nil, cancel: SybrinBiometrics.cancelCallbackType? = nil )

Executes the facial training feature. Read more at Facial Training.

loadModel

@objc final public func loadModel( for identifier: String, success: SybrinBiometrics.loadModelSuccessCallbackType? = nil, failure: SybrinBiometrics.failureCallbackType? = nil )

Executes the load model feature. Read more at Load Model.

openFacialRecognition

@objc final public func openFacialRecognition( on viewController: UIViewController, for identifier: String, doneLaunching: SybrinBiometrics.doneLaunchingType? = nil, success: SybrinBiometrics.facialRecognitionSuccessCallbackType? = nil, failure: SybrinBiometrics.failureCallbackType? = nil, cancel: SybrinBiometrics.cancelCallbackType? = nil )

Opens the Sybrin view controller and starts the facial recognition feature. Read more at Facial Recognition.

See also

Last updated