BDFaceLogicService.h
3.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
//
// BDFaceLogicService.h
// BDStyleConfig
//
// Created by Zhang,Jian(MBD) on 2021/9/17.
//
#import <Foundation/Foundation.h>
#import <BDFaceLogicLayer/BDFaceLogicConstant.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
/**
* 请求之前会调用
*/
typedef void(^BDFaceLogicServiceShowLoading)(void);
@interface BDFaceLogicService : NSObject
/**
* 目前最上面的controller
*/
@property (nonatomic, weak) UIViewController *topController;
/**
* 即将展示loading页面
*/
@property (nonatomic, copy) BDFaceLogicServiceShowLoading showLoadingAction;
/**
BDFaceLogicService 指定初始化方法
@Discussion 必须用这个方法进行初始化
@parameter response 回调参数
*/
- (instancetype)initWithController:(UIViewController * _Nonnull)controller
face:(void(^)(void))initFaceBlock
ocr:(void(^)(void))initOcrBlock;
/**
人证核验接口
@Discussion 使用直接传入参数的形式进行人脸识别,页面将直接展示人脸信息采集页面,成功后直接返回结果。
@parameter dic 参数Dictionary,内部的Key有如下
必传参数:
BDFaceLogicServiceTokenKey 对应传入Token, 值为NSString类型;
BDFaceLogicServiceNameKey 对应传入姓名, 值为NSString类型;
BDFaceLogicServiceCardNumberKey 应传入证件号, 值为NSString类型;
可选参数:
BDFaceLogicServiceCardTypeKey 对应传入证件类型,value type NSNumber
BDFaceLogicServicePlanIdKe 对应传入Plan_id, 值为NSString类型;
BDFaceLogicServiceOnlineQualityControlKey onlinequality 值为NSString类型;
BDFaceLogicServiceLivenessQualityControlKey livenessQuality 值为NSString类型
@Parameter callBack回调信息:
resultCode 结果回调状态码;
Type: int类型
0 为成功,其余为失败
resultDic,回调的详细信息
key: BDFaceLogicServiceReturnKeyForResultData 如果成功,能根据该值,得到最终服务端返回的数据,Dictionary类型;如果失败,那么为空对象;
key: BDFaceLogicServiceReturnKeyForResultMsg; 根据该Key,调用失败时,返回具体的失败信息
*/
- (void)startRecognize:(NSDictionary *)dic
callBack:(void(^)(int resultCode, NSDictionary *resultDic))callBack;
/**
活体检测接口,需要先采集人脸信息,之后进行活体检测
@Discussion 集合了本地活体检测和云端活体检测
@Parameter dic 活体检测入参信息asd
@Parameter callBack回调信息:
resultCode 结果回调状态码;
Type: int类型
0 为成功,其余为失败
resultDic,回调的详细信息
key: BDFaceLogicServiceReturnKeyForResultData 如果成功,能根据该值,得到最终服务端返回的数据,Dictionary类型;如果失败,那么为空对象;
key: BDFaceLogicServiceReturnKeyForResultMsg; 根据该Key,调用失败时,返回具体的失败信息
*/
- (void)startRecognizeToCheckLive:(NSDictionary *)dic
callBack:(void(^)(int resultCode, NSDictionary *resultDic))callBack;
/**
* 人脸比对接口,用来采集人脸并获取加密图片,使用的话,需要集合后台集合做进一步开发
*/
- (void)startFaceCollect:(void(^)(int resultCode, NSDictionary *resultDic))callBack;
@end
NS_ASSUME_NONNULL_END