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 }
-
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) NSString *version;
Swift
var version: String? { 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;
-
Processes given
RFSMatchFacesRequest
and calls back thecompletionHandler
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.
-
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, passfalse
.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, passfalse
.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()
-
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 controlleranimated
Pass
true
to animate the presentation otherwise, passfalse
.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 controlleranimated
Pass
true
to animate the presentation otherwise, passfalse
.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()