RFSLivenessConfiguration

Objective-C


@interface RFSLivenessConfiguration
    : RFSBaseConfiguration <RFSLivenessConfigurationBuilder *> <NSObject>

Swift

class LivenessConfiguration : BaseConfiguration<LivenessConfigurationBuilder>, NSObjectProtocol

Configuration for the Liveness processing.

This class is used as a parameters for -[RFSFaceSDK startLivenessFrom:animated:configuration:onLiveness:completion:]. The configuration provides convenient properties to change the behavior and the appearance of the Liveness UI module.

  • Defines whether the RFSHintView idle animation is enabled or not. Defaults to true. When set to false the RFSHintView will not play the animation that is triggered when hint statuses remain the same for some time.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readonly,
              getter=isHintAnimationEnabled) BOOL enableHintAnimation;

    Swift

    var isHintAnimationEnabled: Bool { get }

Liveness

  • The number of attempts to pass the Liveness before completing with error. Defaults to 0. When set to 0 the Liveness will always ask to retry on error. When set to 1 or more the Liveness will end with RFSLivenessError.RFSLivenessErrorProcessingAttemptsEnded error when the number of attemps exceeds.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSInteger attemptsCount;

    Swift

    var attemptsCount: Int { get }
  • Defines whether the liveness request sends a location of a device. Defaults to true. When set to true the liveness request to web service will contain the location object within the json metadata object. The location is used only when permissions are granted and the location is available.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readonly,
              getter=isLocationTrackingEnabled) BOOL locationTrackingEnabled;

    Swift

    var isLocationTrackingEnabled: Bool { get }
  • Defines whether the liveness recording video of processing. Defaults to true.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readonly,
              getter=isRecordingProcessEnabled) BOOL recordingProcessEnabled;

    Swift

    var isRecordingProcessEnabled: Bool { get }

Camera

  • Defines, whether the camera’s toolbar switch camera button is available on the Liveness UI. Defaults to false. When set to true the CameraToolbarView will contain a button to change current cameraPosition.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readonly,
              getter=isCameraSwitchButtonEnabled) BOOL cameraSwitchButtonEnabled;

    Swift

    var isCameraSwitchButtonEnabled: Bool { get }
  • Defines, whether the camera’s toolbar torch button is available on the Liveness UI. Defaults to true. When set to false the CameraToolbarView won’t contain a button to toggle camera’s flashlight.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readonly,
              getter=isTorchButtonEnabled) BOOL torchButtonEnabled;

    Swift

    var isTorchButtonEnabled: Bool { get }
  • Defines, whether the camera’s toolbar close button is available on the Liveness UI. Defaults to true. When set to false the CameraToolbarView won’t contain a button to close a module

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readonly,
              getter=isCloseButtonEnabled) BOOL closeButtonEnabled;

    Swift

    var isCloseButtonEnabled: Bool { get }
  • Selected camera device position. Defaults to .front.

    Declaration

    Objective-C

    @property (nonatomic, readonly) RFSCameraPosition cameraPosition;

    Swift

    var cameraPosition: CameraPosition { get }