RFSFaceSDK

Objective-C


@interface RFSFaceSDK : NSObject

Swift

class FaceSDK : NSObject

The entry point to the Face SDK features.

  • A shared instance of RFSFaceSDK.

    Declaration

    Objective-C

    @property (class, nonatomic, strong, readonly, nonnull) RFSFaceSDK *service;

    Swift

    class var service: FaceSDK { get }
  • Undocumented

    Declaration

    Objective-C

    @property(readonly, nonatomic, strong, nonnull) RFSPersonDatabase* personDatabase

    Swift

    var personDatabase: RFSPersonDatabase { get }
  • An URL of your web service instance.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *serviceURL;

    Swift

    var serviceURL: String? { get set }
  • The Face SDK version.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) RFSFaceSDKVersion *version;

    Swift

    var version: RFSFaceSDKVersion? { get }
  • A localization hook to override default localization search logic. If this block is not set or the implementation of the block returns nil the default localization will be used.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *_Nullable (^) (NSString *_Nonnull) localizationHandler;

    Swift

    var localizationHandler: ((String) -> String?)? { get set }
  • Delegate that responds to request intercepting events. Use the delegate to modify URLRequest requests before they are send to the web service.

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id<RFSURLRequestInterceptingDelegate> requestInterceptingDelegate;

    Swift

    weak var requestInterceptingDelegate: (any RFSURLRequestInterceptingDelegate)? { get set }
  • Deprecated

    Deprecated in FaceSDK 6.2. Use livenessDelegate instead

    Delegate that informs about the liveness process statuses.

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id<RFSLivenessProcessStatusDelegate> processStatusDelegate;

    Swift

    weak var processStatusDelegate: (any LivenessProcessStatusDelegate)? { get set }
  • Delegate that notifies about the face capture process events.

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id<RFSFaceCaptureDelegate> faceCaptureDelegate;

    Swift

    weak var faceCaptureDelegate: (any FaceCaptureDelegate)? { get set }
  • Delegate that notifies about the liveness process events.

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id<RFSLivenessDelegate> livenessDelegate;

    Swift

    weak var livenessDelegate: (any LivenessDelegate)? { get set }
  • Delegate that informs about the successfull upload of the video.

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id<RFSVideoUploadingDelegate> videoUploadingDelegate;

    Swift

    weak var videoUploadingDelegate: (any VideoUploadingDelegate)? { get set }
  • Liveness and Face Capture view controller customization and etc.

    Declaration

    Objective-C

    @property (nonatomic, strong, nonnull) RFSCustomization *customization;

    Swift

    var customization: RFSCustomization { get set }
  • Method returns state of FaceSDK core. YES when FaceSDK core was initialized successfully.

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isInitialized) BOOL initialized;

    Swift

    var isInitialized: Bool { get }
  • Undocumented

    Declaration

    Objective-C

    - (void)initializeWithCompletion:(RFSInitializationCompletion _Nonnull)completion NS_SWIFT_NAME(initialize(completion:));

    Swift

    func initialize() async throws -> Bool
  • Undocumented

    Declaration

    Objective-C

    - (void)initializeWithConfiguration:(nullable RFSInitializationConfiguration *)configuration
                             completion:(RFSInitializationCompletion _Nonnull)completion NS_SWIFT_NAME(initialize(configuration:completion:));

    Swift

    func initialize(configuration: RFSInitializationConfiguration?) async throws -> Bool
  • Processes given RFSMatchFacesRequest and calls back the completionHandler block when finished.

    Declaration

    Objective-C

    - (void)matchFaces:(nonnull RFSMatchFacesRequest *)request
            completion:(void (^_Nonnull)(RFSMatchFacesResponse *_Nonnull))
                           completionHandler;

    Swift

    func matchFaces(_ request: RFSMatchFacesRequest) async -> RFSMatchFacesResponse

    Parameters

    request

    Processing request.

    completionHandler

    Completion block to call when request is finished processing.

  • Processes given RFSMatchFacesRequest and calls back the completionHandler block when finished.

    Declaration

    Objective-C

    - (void)matchFaces:(nonnull RFSMatchFacesRequest *)request
         configuration:(nullable RFSMatchFacesConfiguration *)configuration
            completion:(void (^_Nonnull)(RFSMatchFacesResponse *_Nonnull))
                           completionHandler;

    Swift

    func matchFaces(_ request: RFSMatchFacesRequest, configuration: RFSMatchFacesConfiguration?) async -> RFSMatchFacesResponse

    Parameters

    request

    Processing request.

    configuration

    Configuration object. Falls back to the default configuration when nil.

    completionHandler

    Completion block to call when request is finished processing.

  • Presents a liveness view controller.

    Declaration

    Objective-C

    - (void)startLivenessFrom:(nonnull UIViewController *)presenting
                     animated:(BOOL)animated
                configuration:(nullable RFSLivenessConfiguration *)configuration
                   onLiveness:
                       (nullable void (^)(RFSLivenessResponse *_Nonnull))onLiveness
                   completion:(nullable void (^)(void))completion;

    Swift

    func startLiveness(from presenting: UIViewController, animated: Bool, configuration: RFSLivenessConfiguration?, onLiveness: ((RFSLivenessResponse) -> Void)?) async

    Parameters

    presenting

    The UIViewController that will present the liveness view controller.

    animated

    Pass true to animate the presentation otherwise, pass false.

    onLiveness

    Liveness response.

    configuration

    Configuration object. Falls back to the default configuration when nil.

    completion

    Presentation transition completion block.

  • Presents a liveness view controller

    Declaration

    Objective-C

    - (void)startLivenessFrom:(nonnull UIViewController *)presenting
                     animated:(BOOL)animated
                   onLiveness:
                       (nullable void (^)(RFSLivenessResponse *_Nonnull))onLiveness
                   completion:(nullable void (^)(void))completion;

    Swift

    func startLiveness(from presenting: UIViewController, animated: Bool, onLiveness: ((RFSLivenessResponse) -> Void)?) async

    Parameters

    presenting

    The UIViewController that will present the liveness view controller.

    animated

    Pass true to animate the presentation otherwise, pass false.

    onLiveness

    Completion block to call when the liveness is finished processing.

    completion

    Presentation transition completion block.

  • Stops the liveness processing and closes the view controller.

    Declaration

    Objective-C

    - (void)stopLivenessProcessing;

    Swift

    func stopLivenessProcessing()
  • Processes given request and calls back the completionHandler block when finished. Requires network connection.

    Declaration

    Objective-C

    - (void)detectFacesByRequest:(nonnull RFSDetectFacesRequest *)request
                      completion:(nonnull void (^)(
                                     RFSDetectFacesResponse *_Nonnull))completion;

    Swift

    func detectFaces(by request: RFSDetectFacesRequest) async -> RFSDetectFacesResponse

    Parameters

    request

    Processing request.

    completion

    Completion block to call when request is finished processing.

  • Presents face capturing view controller

    Declaration

    Objective-C

    - (void)
        presentFaceCaptureViewControllerFrom:(nonnull UIViewController *)presenting
                                    animated:(BOOL)animated
                               configuration:
                                   (nullable RFSFaceCaptureConfiguration *)
                                       configuration
                                   onCapture:(nullable void (^)(
                                                 RFSFaceCaptureResponse *_Nonnull))
                                                 onCapture
                                  completion:(nullable void (^)(void))completion;

    Swift

    func presentFaceCaptureViewController(from presenting: UIViewController, animated: Bool, configuration: RFSFaceCaptureConfiguration?, onCapture: ((RFSFaceCaptureResponse) -> Void)?) async

    Parameters

    presenting

    The UIViewController that will present face capturing view controller

    animated

    Pass true to animate the presentation otherwise, pass false.

    configuration

    Configuration object. Falls back to the default configuration when nil.

    onCapture

    Completion block to call when the face capture is finished processing.

    completion

    Presentation transition completion block.

  • Presents a face capturing view controller

    Declaration

    Objective-C

    - (void)
        presentFaceCaptureViewControllerFrom:(nonnull UIViewController *)presenting
                                    animated:(BOOL)animated
                                   onCapture:(nullable void (^)(
                                                 RFSFaceCaptureResponse *_Nonnull))
                                                 onCapture
                                  completion:(nullable void (^)(void))completion;

    Swift

    func presentFaceCaptureViewController(from presenting: UIViewController, animated: Bool, onCapture: ((RFSFaceCaptureResponse) -> Void)?) async

    Parameters

    presenting

    The UIViewController that will present face capturing view controller

    animated

    Pass true to animate the presentation otherwise, pass false.

    onCapture

    Completion block to call when the face capture is finished processing.

    completion

    Presentation transition completion block.

  • Stops the face capturing and closes the view controller.

    Declaration

    Objective-C

    - (void)stopFaceCaptureViewController;

    Swift

    func stopFaceCaptureViewController()
  • FaceSDK deinitialization.

    Declaration

    Objective-C

    - (void)deinitialize;

    Swift

    func deinitialize()