feat:引入人脸识别sdk
This commit is contained in:
1 parent
ce16eaf82e
commit
158d012eff
331 files changed
+13539
No files matched your search
Binary file not shown.
@@ -0,0 +1,76 @@
|
||||
//
|
||||
// AFEAlertView.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by shuhong.xsh on 16/8/3.
|
||||
// Copyright © 2016年 DTF. All rights reserved.
|
||||
// 弹出框管理类
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
typedef void (^AFEAlertClickBlock) ();
|
||||
|
||||
@interface AFEAlertView : NSObject
|
||||
|
||||
@property(atomic, assign) BOOL isAlertViewShow;
|
||||
|
||||
+(AFEAlertView*) sharedInstance;
|
||||
|
||||
/**
|
||||
* 当前alert是否显示
|
||||
*/
|
||||
- (BOOL)isAlertViewShow;
|
||||
|
||||
/**
|
||||
* 显示alert
|
||||
*
|
||||
* @param title 标题
|
||||
* @param msg 提示信息
|
||||
* @param firstTitle 第一个按钮提示文案(不可为空)
|
||||
* @param secondTitle 第二课提示文案(可为空)
|
||||
* @param fblk 第一个按钮点击事件callback(不可为空)
|
||||
* @param sblk 第二个按钮点击事件callback(可为空)
|
||||
*/
|
||||
- (void)displayAlertViewWithTitle:(NSString *)title
|
||||
message:(NSString*)msg
|
||||
firstButtonTitle:(NSString *)firstTitle
|
||||
secondBittonTitle:(NSString *)secondTitle
|
||||
firstCallBack:(AFEAlertClickBlock)fblk
|
||||
secondCallBack:(AFEAlertClickBlock)sblk
|
||||
withVC:(UIViewController*)parentViewController;
|
||||
|
||||
|
||||
/**
|
||||
* 活体失败
|
||||
*
|
||||
*/
|
||||
- (void)displayLivnessFailAlertView:(NSString *)title
|
||||
tips:(NSString*)tip
|
||||
cancleTip:(NSString *)cancelTips
|
||||
retryTip:(NSString *)retryTips
|
||||
withCancelCallBack:(AFEAlertClickBlock)cancel
|
||||
retryCallBack:(AFEAlertClickBlock)retry
|
||||
withVC:(UIViewController*)parentViewController;
|
||||
|
||||
/**
|
||||
* 展示浮层提示框
|
||||
* @param superview 父view
|
||||
* @param title 主文案,只能显示一行
|
||||
* @param detailTitle 副文案,最多显示两行
|
||||
* @param cancelTips 取消按钮文本
|
||||
* @param retryTips 再试一次按钮文本
|
||||
*/
|
||||
- (void)displayCameraPermissionAlert:(UIViewController *)parentViewController
|
||||
title:(NSString *)title
|
||||
detailTitle:(NSString *)detailTitle
|
||||
cancleTip:(NSString *)cancelTips
|
||||
retryTip:(NSString *)retryTips
|
||||
cancelCallBack:(AFEAlertClickBlock)cancelCall
|
||||
setCallBack:(AFEAlertClickBlock)setCall;
|
||||
|
||||
// 判断最顶层视图是否是 APBAlertViewController
|
||||
- (BOOL)isAPBAlertViewController;
|
||||
|
||||
- (UIViewController *)currentViewController;
|
||||
|
||||
@end
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// AFECircleProgressBar.h
|
||||
// CircularView
|
||||
//
|
||||
// Created by shouyi.www on 2017/6/26.
|
||||
// Copyright © 2017年 shouyi.www. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
|
||||
@interface AFECircleProgressBar : CALayer
|
||||
|
||||
@property (nonatomic, assign) BOOL clockWise;
|
||||
@property (nonatomic, assign) CGFloat animateTime;
|
||||
@property (nonatomic, assign) CGFloat endAngle;
|
||||
@property (nonatomic, assign) CGFloat progressBarWidth;
|
||||
@property (nonatomic, assign) CGFloat maxValue;
|
||||
@property (nonatomic, assign) CGFloat minValue;
|
||||
@property (nonatomic, assign) CGFloat startAngle;
|
||||
@property (nonatomic, copy) NSArray<NSNumber *> *gradientLocation;
|
||||
@property (nonatomic, strong) NSMutableArray<UIColor *> *gradientColors;
|
||||
@property (nonatomic, assign) CGFloat progress;
|
||||
@property (nonatomic, strong) UIColor *progressBarTrackColor;
|
||||
@property (nonatomic, assign) BOOL supportCustomUI;
|
||||
|
||||
- (void)setProgress:(CGFloat)percent animation:(BOOL)animated;
|
||||
- (void)_updateCircularPath;
|
||||
- (void)stopAnimation;
|
||||
|
||||
@end
|
||||
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
//
|
||||
// AFECircularView.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by yukun.tyk on 01/11/2016.
|
||||
// Copyright © 2016 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <BioAuthEngine/AFEScanViewDelegate.h>
|
||||
#import "DTFTextLayer.h"
|
||||
#import "AFECircleProgressBar.h"
|
||||
#import "DTFUIElementManager.h"
|
||||
#import "DTFUploadWaveLayer.h"
|
||||
|
||||
@class AFEStatusBar, AFECircleProgressBar, APBBlurView;
|
||||
|
||||
@protocol AFECircularViewProtocol <NSObject>
|
||||
|
||||
- (void)onStopScan;
|
||||
|
||||
@optional
|
||||
- (void)playBtn:(UIButton *)btn;
|
||||
|
||||
@end
|
||||
|
||||
@interface AFECircularView : UIView<AFEScanViewProtocol>
|
||||
|
||||
@property (strong, nonatomic) AFEStatusBar *statusBar;
|
||||
@property (nonatomic, strong) CALayer *compactLayer;
|
||||
@property (nonatomic, strong) CALayer *cameraLayer;
|
||||
@property (nonatomic, assign) float cameraStartY;
|
||||
@property (nonatomic, assign) float cameraEndY;
|
||||
@property (nonatomic, assign) BOOL isWish;
|
||||
@property (nonatomic, strong) DTFTextLayer *bottomTipLayer;
|
||||
@property (nonatomic, strong) DTFTextLayer *tipLayer;
|
||||
@property (nonatomic, strong) CALayer *tipBackgroundLayer;
|
||||
@property (nonatomic, strong) DTFTextLayer *powerByLayer;
|
||||
@property (nonatomic, strong) AFECircleProgressBar *progressBar;
|
||||
@property (nonatomic, strong) DTFUploadWaveLayer *waveLayer;
|
||||
@property (nonatomic, strong) DTFTextLayer * stopScanTipLayer;
|
||||
@property (nonatomic, weak) id<AFECircularViewProtocol> aFECirViewDelegate;
|
||||
@property (nonatomic, strong) UIButton * stopScanTipButton;
|
||||
@property (nonatomic, assign) double widthCoefficient;
|
||||
@property (nonatomic, copy) NSDictionary *bottomTipAttrDict;
|
||||
@property (nonatomic, copy) NSDictionary *tipAttrDict;
|
||||
@property (nonatomic, assign) BOOL supportCustomUI;
|
||||
@property (nonatomic, strong) UIView *tipView;
|
||||
@property (nonatomic, strong) UIImageView *tipImageView;
|
||||
@property (nonatomic, strong) UILabel *tipLabel;
|
||||
@property (nonatomic, assign) CGSize tipTextSize;
|
||||
|
||||
- (instancetype)initWithSupportCustomUI:(BOOL)supportCustomUI;
|
||||
- (void)showPercent:(CGFloat)stage;
|
||||
- (void)showtip:(NSString *)tip;
|
||||
- (void)showBottomTip:(NSString *)bottomTip;
|
||||
- (void)addCameraPreviewLayer:(CALayer *)cameraPreviewLayer;
|
||||
- (void)powerByLayerHidden:(BOOL)hidden;
|
||||
- (void)setBottomTipHidden:(BOOL)hidden;
|
||||
- (void)setScreenRotation:(BOOL)isRotation;
|
||||
- (void)setPlayBtnIcon:(NSString *)platformInfo;
|
||||
|
||||
- (void)setStopScanButtonHidden:(BOOL)hidden;
|
||||
- (void)setMaskImage:(UIImage *)bestImage;
|
||||
- (void)startWave;
|
||||
- (void)stopWave;
|
||||
- (void)setAFECirViewDelegate:(id<AFECircularViewProtocol>)delegate;
|
||||
- (void)showBrandTip:(NSString *)brandTip;
|
||||
- (void)showStopScanTip:(NSString *)stopScanTip;
|
||||
- (void)hideViewList;
|
||||
- (void)showViewList;
|
||||
- (void)_buildShowView;
|
||||
- (void)_updateView;
|
||||
|
||||
@end
|
||||
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// AFEScanViewDelegate.h
|
||||
// FaceEyePrint
|
||||
//
|
||||
// Created by yukun.tyk on 12/28/15.
|
||||
// Copyright © 2015 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <BioAuthEngine/AFEStatusBar.h>
|
||||
|
||||
/**
|
||||
* 扫描界面接口,可以展示扫描动画和提示错误消息,错误消息内部做了平滑处理,
|
||||
* 1s内只会显示一条错误消息,在这期间传入的消息会做缓存处理,最多缓存1条消息
|
||||
* 如果同时播放声音,声音会与错误消息做同步处理
|
||||
*/
|
||||
|
||||
typedef NS_ENUM(NSInteger, AFEScanViewStatus) {
|
||||
AFE_SCAN_SHOWING_ERROR, //正在显示错误
|
||||
AFE_SCAN_SCANNING, //正在扫描
|
||||
AFE_SCAN_HOLDING, //等待显示缓存信息
|
||||
AFE_SCAN_STOPPED, //停止中
|
||||
};
|
||||
|
||||
|
||||
@protocol AFEScanViewProtocol <NSObject>
|
||||
|
||||
/**
|
||||
* 导航栏回调
|
||||
*/
|
||||
- (void)setDelegate:(id<IStatusBarDelegate>)delegate;
|
||||
|
||||
/**
|
||||
* 设置导航栏透明度
|
||||
*/
|
||||
- (void)setNaviBarAlpha:(CGFloat)alpha;
|
||||
|
||||
/**
|
||||
* 设置扫描进度
|
||||
*/
|
||||
- (void)showPercent:(CGFloat)stage;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// AFEStatusBar.h
|
||||
// FaceEyePrint
|
||||
//
|
||||
// Created by yukun.tyk on 12/17/15.
|
||||
// Copyright © 2015 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@protocol IStatusBarDelegate <NSObject>
|
||||
- (void)onButtonCancel;
|
||||
@optional
|
||||
- (void)onSoundStatusChanged:(BOOL)newStatus;
|
||||
@end
|
||||
|
||||
@interface AFEStatusBar : UIView
|
||||
|
||||
- (void)onButtonCancel;
|
||||
|
||||
- (void)setDelegate:(id<IStatusBarDelegate>)delegate;
|
||||
|
||||
- (void)setTransparent:(CGFloat) alpha;
|
||||
|
||||
- (void)setCancelButtonHidden:(BOOL)hidden;
|
||||
|
||||
/// 适老化 调用
|
||||
- (void)setCancelButtonImage:(UIImage *)image;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// AFEUploadView.h
|
||||
// FaceEyePrint
|
||||
//
|
||||
// Created by yukun.tyk on 12/14/15.
|
||||
// Copyright © 2015 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
//
|
||||
|
||||
|
||||
@interface AFEUploadView : UIView
|
||||
|
||||
|
||||
@property (strong, nonatomic) UILabel *label;
|
||||
@property (strong, nonatomic) UIView *backgroundView;
|
||||
@property (strong, nonatomic) UIImageView *backgroundImageView;
|
||||
|
||||
|
||||
- (void)beginUploading;
|
||||
- (void)stopUploading;
|
||||
- (void)setBackgroundImage:(UIImage *)img;
|
||||
|
||||
@end
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
//
|
||||
// AFEWebGuideView.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by yukun.tyk on 3/21/16.
|
||||
// Copyright © 2016 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <BioAuthEngine/AFEStatusBar.h>
|
||||
#import <WebKit/WebKit.h>
|
||||
#import <DTFUtility/APBToygerRemoteConfig.h>
|
||||
#import "DTFUICustom.h"
|
||||
|
||||
typedef NS_ENUM(NSUInteger, AFEWebGuideCancelType) {
|
||||
AFEWebGuideCancelTypeActiveWithdrawal = 0,//主动退出
|
||||
AFEWebGuideCancelTypeNotCertifiedYet,//暂不认证
|
||||
};
|
||||
|
||||
@protocol AFEWebGuideViewDelegate <NSObject>
|
||||
|
||||
- (void)onButtonBegin:(BOOL)suitableType query:(NSDictionary *)dict;
|
||||
- (void)onButtonCancel:(AFEWebGuideCancelType)cancelType;//退出
|
||||
|
||||
@optional
|
||||
- (void)onLoadFinished:(BOOL)success;
|
||||
- (void)onH5Logger:(NSString *)h5Logger;
|
||||
- (void)onButtonAgreement;
|
||||
|
||||
@end
|
||||
|
||||
@interface AFEWebTopBar: UIView
|
||||
|
||||
@end
|
||||
|
||||
@interface AFEWebGuideView : UIView <IStatusBarDelegate,WKScriptMessageHandler, WKUIDelegate, WKNavigationDelegate>
|
||||
|
||||
@property(strong,nonatomic) WKWebView *wkwebView;
|
||||
|
||||
@property(nonatomic, assign)BOOL loaded;
|
||||
@property(nonatomic, strong)APBToygerAlertConfig *toygerAlertConfig;
|
||||
@property(nonatomic, weak)UIViewController *currentViewController;
|
||||
@property(nonatomic, strong)DTFUICustom *customProtocol;
|
||||
@property(nonatomic, strong)NSDictionary *alertParam;
|
||||
|
||||
- (void)setWebGuideViewDelegate:(id<AFEWebGuideViewDelegate>)webGuideViewDeleage;
|
||||
- (void)setURL:(NSURL *)url;
|
||||
//清除网页的localstorage,localStorage存储了自定义UI信息
|
||||
- (void)clearUICustomSettingWebLocalStorage;
|
||||
@end
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// APBAlertController.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by yukun.tyk on 3/2/16.
|
||||
// Copyright © 2016 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
|
||||
extern NSString *const kAlertViewAppear;
|
||||
extern NSString *const kAlertViewDisappear;
|
||||
|
||||
|
||||
@interface APBAlertController : UIAlertController
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// APBAuthEngine.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by yukun.tyk on 11/9/15.
|
||||
// Copyright © 2015 DTF. All rights reserved.
|
||||
//
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "BioAuthFacade.h"
|
||||
|
||||
/**
|
||||
生物认证类型定义
|
||||
*/
|
||||
typedef enum {
|
||||
BIO_FACE = 100, //人脸识别
|
||||
BIO_VOICE = 101, //声纹识别
|
||||
BIO_HANDWRITING = 103, //笔迹识别
|
||||
BIO_IDPAPERS = 107, //重构后的证件宝
|
||||
BIO_CARD = 109, //证件宝
|
||||
BIO_DTF_DOC = 110, //一体化证件宝
|
||||
BIO_FACE_VOICE = 202, //人脸+声纹识别
|
||||
BIO_FACE_EYE = 201, //人脸+眼纹识别
|
||||
BIO_CARD_FACE = 200, //人证合一
|
||||
BIO_TOYGER = 300, //Toyger产品
|
||||
}APBBioType;
|
||||
|
||||
/**
|
||||
操作类型定义
|
||||
*/
|
||||
typedef enum {
|
||||
ACTION_COLLECT = 300, //采集操作
|
||||
ACTION_VERFIY = 301, //验证操作
|
||||
}APBActionType;
|
||||
|
||||
@interface APBAuthEngine : NSObject
|
||||
|
||||
/**
|
||||
* 唤起生物认证之前获取框架meta数据
|
||||
*/
|
||||
+ (NSString *)getBioMetaInfo;
|
||||
|
||||
/**
|
||||
* 触发下载资源文件
|
||||
*/
|
||||
+ (void)preLoad;
|
||||
|
||||
/**
|
||||
* 申请生物认证
|
||||
*
|
||||
* @param request 生物认证请求
|
||||
* @param callback 生物认证结果回调处理
|
||||
*/
|
||||
- (void)authWithRequest:(APBRequest *)request withCallback:(BioAuthCallback)callback;
|
||||
|
||||
/**
|
||||
* 让正在进行中的生物认证因子执行某种操作
|
||||
*
|
||||
* @param command 操作码
|
||||
* @param callback 执行结果回调
|
||||
*/
|
||||
- (void)exec:(APBCommand *)command withCompletionCallback:(BioAuthExecCallback)callback;
|
||||
|
||||
/**
|
||||
* 当前是否运行任务
|
||||
*/
|
||||
- (BOOL)isBusy;
|
||||
|
||||
/**
|
||||
* 生物认证类型版本号
|
||||
*
|
||||
* @return 生物认证类型版本号
|
||||
*/
|
||||
- (NSString *)version;
|
||||
|
||||
/**
|
||||
* 当前运行的认证方式
|
||||
*/
|
||||
+ (NSString *)getAuthFactorName;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// APBAuthFacade.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by yukun.tyk on 11/9/15.
|
||||
// Copyright © 2015 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <BioAuthEngine/APBEvent.h>
|
||||
#import <BioAuthEngine/IBioAuthFactor.h>
|
||||
#import <BioAuthEngine/IBioAuthTask.h>
|
||||
#import <BioAuthEngine/APBTaskContext.h>
|
||||
#import <BioAuthEngine/APBBackwardCommand.h>
|
||||
#import <BioAuthEngine/NSTimer+bioAuth.h>
|
||||
#import <BioAuthEngine/APBAuthEngine.h>
|
||||
#import <BioAuthEngine/BioAuthCommonSetting.h>
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
//
|
||||
// APBBackwardCommand.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by yukun.tyk on 11/26/15.
|
||||
// Copyright © 2015 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
|
||||
/**
|
||||
* 任务队列可要求框架执行的命令
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, APBBackwardCommandType) {
|
||||
BACKWARD_COMMAND_RESTART = 300, //重新开始任务队列,task可以设置params来指定冲新开始的任务下标
|
||||
BACKWARD_COMMAND_ADD_PARALLEL_TASK = 302, //添加并行任务
|
||||
BACKWARD_COMMNAD_GLOBAL_TIMER = 305, //全局timer操作
|
||||
BACKWARD_COMMNAD_UPLOAD_DATA = 400, //合并上传
|
||||
BACKWARD_COMMNAD_STOP_SCANCE = 401, //关闭扫描
|
||||
BACKWARD_COMMNAD_OCRUPLOAD_DATA = 402, //EKYC OCR上传
|
||||
BACKWARD_COMMNAD_OCRUPLOADCONFIRM_DATA = 403, //EKYC OCR确认
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSInteger, APBTimerCommandType) {
|
||||
TIMER_COMMAND_START, //开始全局计时
|
||||
TIMER_COMMAND_CANCEL, //取消全局计时
|
||||
TIMER_COMMAND_PAUSE, //暂停全局计时
|
||||
TIMER_COMMAND_RESUME, //恢复全局计时
|
||||
};
|
||||
|
||||
/**
|
||||
* param key {BACKWARD_COMMAND_RESTART}
|
||||
* 重新开始命令,指定从第几个任务开始
|
||||
*/
|
||||
extern NSString *const kCommandRestartTaskIndexKey;
|
||||
|
||||
/**
|
||||
* param key {BACKWARD_COMMAND_ADD_PARALLEL_TASK}
|
||||
* 添加并行任务,value为id<IBioAuthTask>,新任务会在新线程中并行运行
|
||||
*/
|
||||
extern NSString *const kAddParallelTaskInstanceKey;
|
||||
|
||||
/**
|
||||
* 全局计时器操作命令
|
||||
* value为NSNumber{APBTimerCommandType}
|
||||
*/
|
||||
extern NSString *const kGlobalTimerCommandKey;
|
||||
|
||||
|
||||
@interface APBBackwardCommand : NSObject
|
||||
|
||||
@property(nonatomic, assign, readonly)APBBackwardCommandType commandType;
|
||||
@property(nonatomic, strong, readonly)NSDictionary *params;
|
||||
|
||||
- (instancetype)initWithCommandType:(APBBackwardCommandType)commandType
|
||||
withParams:(NSDictionary *)params;
|
||||
|
||||
@end
|
||||
+145
@@ -0,0 +1,145 @@
|
||||
//
|
||||
// APBBehavLogModel.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by yukun.tyk on 3/15/16.
|
||||
// Copyright © 2016 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <BioAuthEngine/APBConfig.h>
|
||||
|
||||
//JSON
|
||||
#ifndef SUPPORT_PB
|
||||
|
||||
@interface BisClientInfo : NSObject
|
||||
@property (nonatomic,strong) NSString* model;
|
||||
@property (nonatomic,strong) NSString* os;
|
||||
@property (nonatomic,strong) NSString* osVer;
|
||||
@property (nonatomic,strong) NSString* clientVer;
|
||||
@end
|
||||
|
||||
@interface BisBehavToken : NSObject
|
||||
@property (nonatomic,strong) NSString* token;
|
||||
@property (nonatomic,strong) NSString* type;
|
||||
@property (nonatomic,strong) NSString* sampleMode;
|
||||
@property (nonatomic,strong) NSString* uid;
|
||||
@property (nonatomic,strong) NSString* apdid;
|
||||
@property (nonatomic,strong) NSString* appid;
|
||||
@property (nonatomic,strong) NSString* behid;
|
||||
@property (nonatomic,strong) NSString* bizid;
|
||||
@property (nonatomic,strong) NSString* verifyid;
|
||||
@property (nonatomic,strong) NSString* vtoken;
|
||||
@property (nonatomic,strong) NSString* apdidToken;
|
||||
@end
|
||||
|
||||
@interface BisBehavCommon : NSObject
|
||||
@property (nonatomic,strong) NSString* invtp;
|
||||
@property (nonatomic,strong) NSString* tm;
|
||||
@property (nonatomic,strong) NSString* retry;
|
||||
@end
|
||||
|
||||
@interface BisBehavTask : NSObject
|
||||
@property (nonatomic,strong) NSString* name;
|
||||
@property (nonatomic,strong) NSString* idx;
|
||||
@property (nonatomic,strong) NSString* dur;
|
||||
@property (nonatomic,strong) NSString* quality;
|
||||
@property (nonatomic,strong) NSString* extInfo;
|
||||
@end
|
||||
|
||||
@interface BisBehavLog : NSObject
|
||||
@property (nonatomic,strong) BisClientInfo* clientInfo;
|
||||
@property (nonatomic,strong) BisBehavToken* behavToken;
|
||||
@property (nonatomic,strong) BisBehavCommon* behavCommon;
|
||||
@property (nonatomic,strong) NSMutableArray * behavTask;
|
||||
@end
|
||||
|
||||
//PB
|
||||
#else
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
#endif
|
||||
#import <APProtocolBuffers/ProtocolBuffers.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@class BisBehavCommon;
|
||||
@class BisBehavLog;
|
||||
@class BisBehavTask;
|
||||
@class BisBehavToken;
|
||||
@class BisClientInfo;
|
||||
|
||||
@interface BisClientInfo : APDPBGeneratedMessage
|
||||
@property (readonly) BOOL hasModel;
|
||||
@property (readonly) BOOL hasOs;
|
||||
@property (readonly) BOOL hasOsVer;
|
||||
@property (readonly) BOOL hasClientVer;
|
||||
@property (nonatomic,strong) NSString* model;
|
||||
@property (nonatomic,strong) NSString* os;
|
||||
@property (nonatomic,strong) NSString* osVer;
|
||||
@property (nonatomic,strong) NSString* clientVer;
|
||||
@end
|
||||
|
||||
@interface BisBehavToken : APDPBGeneratedMessage
|
||||
@property (readonly) BOOL hasToken;
|
||||
@property (readonly) BOOL hasType;
|
||||
@property (readonly) BOOL hasSampleMode;
|
||||
@property (readonly) BOOL hasUid;
|
||||
@property (readonly) BOOL hasApdid;
|
||||
@property (readonly) BOOL hasAppid;
|
||||
@property (readonly) BOOL hasBehid;
|
||||
@property (readonly) BOOL hasBizid;
|
||||
@property (readonly) BOOL hasVerifyid;
|
||||
@property (readonly) BOOL hasVtoken;
|
||||
@property (readonly) BOOL hasApdidToken;
|
||||
@property (nonatomic,strong) NSString* token;
|
||||
@property (nonatomic) SInt32 type;
|
||||
@property (nonatomic) SInt32 sampleMode;
|
||||
@property (nonatomic,strong) NSString* uid;
|
||||
@property (nonatomic,strong) NSString* apdid;
|
||||
@property (nonatomic,strong) NSString* appid;
|
||||
@property (nonatomic,strong) NSString* behid;
|
||||
@property (nonatomic,strong) NSString* bizid;
|
||||
@property (nonatomic,strong) NSString* verifyid;
|
||||
@property (nonatomic,strong) NSString* vtoken;
|
||||
@property (nonatomic,strong) NSString* apdidToken;
|
||||
@end
|
||||
|
||||
@interface BisBehavCommon : APDPBGeneratedMessage
|
||||
@property (readonly) BOOL hasInvtp;
|
||||
@property (readonly) BOOL hasTm;
|
||||
@property (readonly) BOOL hasRetry;
|
||||
@property (nonatomic,strong) NSString* invtp;
|
||||
@property (nonatomic,strong) NSString* tm;
|
||||
@property (nonatomic,strong) NSString* retry;
|
||||
@end
|
||||
|
||||
@interface BisBehavTask : APDPBGeneratedMessage
|
||||
@property (readonly) BOOL hasName;
|
||||
@property (readonly) BOOL hasIdx;
|
||||
@property (readonly) BOOL hasDur;
|
||||
@property (readonly) BOOL hasQuality;
|
||||
@property (readonly) BOOL hasExtInfo;
|
||||
@property (nonatomic,strong) NSString* name;
|
||||
@property (nonatomic,strong) NSString* idx;
|
||||
@property (nonatomic)SInt32 dur;
|
||||
@property (nonatomic)SInt32 quality;
|
||||
@property (nonatomic,strong) NSString* extInfo;
|
||||
@end
|
||||
|
||||
@interface BisBehavLog : APDPBGeneratedMessage
|
||||
@property (readonly) BOOL hasClientInfo;
|
||||
@property (readonly) BOOL hasBehavToken;
|
||||
@property (readonly) BOOL hasBehavCommon;
|
||||
@property (readonly) BOOL hasExtAttr;
|
||||
@property (nonatomic,strong) BisClientInfo* clientInfo ;
|
||||
@property (nonatomic,strong) BisBehavToken* behavToken ;
|
||||
@property (nonatomic,strong) BisBehavCommon* behavCommon ;
|
||||
@property (nonatomic,strong) NSMutableArray<BisBehavTask*>* behavTask ;
|
||||
@property (nonatomic,strong) PBMapStringString* extAttr ;
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// APBBisRequestBuilder.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by 晗羽 on 21/04/2018.
|
||||
// Copyright © 2018 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <DTFUtility/APBBisUploadGwRequest.h>
|
||||
#import <BioAuthEngine/APBBehavLogModel.h>
|
||||
#import <DTFUtility/ToygerData.h>
|
||||
|
||||
@interface APBBisRequestBuilder : NSObject
|
||||
|
||||
+(APBBisUploadGwRequest *) buildRequestwithpubKey:(NSString *) pubKey
|
||||
token:(NSString *) bistoken
|
||||
contentData:(ToygerUploadContent *)content
|
||||
behaveLog:(BisBehavLog *)behavlog
|
||||
andCypherData:(NSString *) aesKeyData;
|
||||
|
||||
+ (APBBisUploadGwRequest *)buildEKYCRequestWithContentData:(NSString *)content
|
||||
behaveLog:(BisBehavLog *)behavlog
|
||||
andCypherData:(NSString *)aesKeyData;
|
||||
|
||||
+ (NSString *)rsaImage:(NSString *) pubKey image:(UIImage *)image;
|
||||
|
||||
+ (UIImage *)compressImage:(UIImage *)image;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// APBCommand.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by yukun.tyk on 11/26/15.
|
||||
// Copyright © 2015 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* 业务方可以执行的任务类型
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, APBCommandType) {
|
||||
COMMAND_QUIT = 100, //业务方强制退出
|
||||
COMMAND_CLOSE_UPLOADPAGE = 101, //业务方关闭上传界面
|
||||
COMMAND_BIS_RETURN = 102, //业务方传递bis服务器返回结果,或网络错误结果
|
||||
};
|
||||
|
||||
@interface APBCommand : NSObject
|
||||
|
||||
@property(nonatomic, assign, readonly)APBCommandType commandType; //操作类型
|
||||
@property(nonatomic, strong, readonly)NSDictionary *params; //操作扩展参数,可以为空
|
||||
|
||||
- (instancetype)initWithCommandType:(APBCommandType)commandType
|
||||
withParams:(NSDictionary *)params;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// APBConfig.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by yukun.tyk on 3/8/16.
|
||||
// Copyright © 2016 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
//是否支持protobuffer
|
||||
//#define SUPPORT_PB
|
||||
//#define USE_FPP
|
||||
|
||||
|
||||
#ifdef SUPPORT_PB
|
||||
static const int kRPCFormat = 1;
|
||||
#else
|
||||
static const int kRPCFormat = 0;
|
||||
#endif
|
||||
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// APBDTFUploadTostView.h
|
||||
// APBToygerFacade
|
||||
//
|
||||
// Created by richard on 28/02/2018.
|
||||
// Copyright © 2018 DTF. All rights reserved.
|
||||
//
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "DTFCustomActivityIndicator.h"
|
||||
@interface APBDTFUploadToastView : UIView
|
||||
|
||||
@property(nonatomic,strong)UIActivityIndicatorView *indicator;
|
||||
|
||||
@property(nonatomic,strong)DTFCustomActivityIndicator *customActivityIndicator;
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame;
|
||||
|
||||
- (void)andSubViewWithFrame:(CGRect)frame AndText:(NSString *)text andStartY:(float)startY;
|
||||
@end
|
||||
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// APBEvent.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by yukun.tyk on 11/26/15.
|
||||
// Copyright © 2015 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class APBCommand;
|
||||
|
||||
extern NSString *const kKeepUploadPageKey; //extInfo key: 生物识别产品是否要保持上传界面,默认不保持
|
||||
|
||||
/**
|
||||
* task可以响应的事件类型
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, APBEventType) {
|
||||
EVENT_QUIT = 100, //退出
|
||||
EVENT_CLOSE_UPLOADPAGE = 101, //业务方关闭上传界面
|
||||
EVENT_BIS_RETURN = 102, //bis服务器返回
|
||||
EVENT_SYSTEM_INTERRUPT = 200, //系统中断
|
||||
EVENT_SYSTEM_INTERRUPT_RESUME = 201, //系统中断恢复
|
||||
EVENT_GLOBAL_TIMEOUT = 202, //全局超时
|
||||
EVENT_TASK_TIMEOUT = 203, //task超时
|
||||
EVENT_ALERT_APPEAR = 204, //alert框显示
|
||||
EVENT_ALERT_DISAPPEAR = 205, //alert框退出
|
||||
EVENT_ABNORMAL_CLOSE = 206, //异常退出
|
||||
EVENT_SYSTEM_ENTER_FOREGROUND = 207, //后台返回前台
|
||||
};
|
||||
|
||||
|
||||
@interface APBEvent : NSObject
|
||||
|
||||
@property(nonatomic, assign, readonly) APBEventType eventType;
|
||||
@property(nonatomic, strong, readonly) NSDictionary *params;
|
||||
|
||||
- (instancetype)initWithEventType:(APBEventType)eventType
|
||||
withParam:(NSDictionary *)params;
|
||||
|
||||
+ (instancetype)eventWithCommand:(APBCommand *)command;
|
||||
|
||||
@end
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// APBFaceVerifyInfo.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by 晗羽 on 28/02/2018.
|
||||
// Copyright © 2018 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface APBFaceVerifyInfo : NSObject
|
||||
|
||||
@property(nonatomic,strong)NSString* dtfDeviceToken;
|
||||
|
||||
+ (instancetype)getInstance;
|
||||
|
||||
//获取语言类型
|
||||
- (NSInteger)languageCode;
|
||||
|
||||
- (NSString *)languageName;
|
||||
|
||||
//在某些未初始化设备指纹的地方提供初始化接口
|
||||
- (void)initDeviceInfo;
|
||||
|
||||
//获取apdidtoken
|
||||
- (NSString *)getApdidToken;
|
||||
|
||||
|
||||
- (BOOL)loadDylib;
|
||||
|
||||
- (UIViewController *)currentVC;
|
||||
|
||||
@end
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// APBGatewayFacade.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by richard on 26/02/2018.
|
||||
// Copyright © 2018 com..iphoneclient.DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
typedef void (^apRpcCompletionBlock)(BOOL success, NSObject *result);
|
||||
|
||||
@interface APBGatewayFacade : NSObject
|
||||
|
||||
|
||||
/**
|
||||
* rpc结果回调
|
||||
*
|
||||
* @param success 网络交互是否成功(不代表服务端返回的结果)
|
||||
* @param result 服务端返回的结果
|
||||
*/
|
||||
-(void)request:(id)bisUploadGwRequest
|
||||
withConfig:(NSDictionary *)configDict
|
||||
completionBlock:(apRpcCompletionBlock)blk;
|
||||
|
||||
@end
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// APBLogger.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by yukun.tyk on 12/8/15.
|
||||
// Copyright © 2015 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <BioAuthEngine/APBConfig.h>
|
||||
|
||||
|
||||
|
||||
extern NSString *const kDebugNotiName; //log信息发送的通知名称
|
||||
|
||||
|
||||
#define __FILE_NAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
|
||||
|
||||
#ifdef DEBUG //debug
|
||||
// std::cout<<"\n[BIOAUTH]:" << [[NSString stringWithFormat:fmt, ##__VA_ARGS__]cStringUsingEncoding:NSUTF8StringEncoding] \
|
||||
// <<", function:" << __PRETTY_FUNCTION__ << ", file:" << __FILE_NAME__ << ", line:" << __LINE__ << ", date:" << \
|
||||
// __DATE__ << ", time:" <<__TIME__<<std::endl;
|
||||
#define BIOAUTH_LOG(fmt, ...) \
|
||||
{ \
|
||||
NSLog(@"[BIOAUTH]: %@, function:%s, file:%s, line:%d, date:%s, time:%s",\
|
||||
[NSString stringWithFormat:fmt, ##__VA_ARGS__], __PRETTY_FUNCTION__, __FILE_NAME__, __LINE__, __DATE__, __TIME__);\
|
||||
}
|
||||
|
||||
#define LOG_DBG(fmt, ...) BIOAUTH_LOG(fmt, ##__VA_ARGS__);
|
||||
#define LOG_INFO(fmt, ...) BIOAUTH_LOG(fmt, ##__VA_ARGS__);
|
||||
#define LOG_ERROR(fmt, ...) BIOAUTH_LOG(fmt, ##__VA_ARGS__);
|
||||
|
||||
#else //release
|
||||
|
||||
#define LOG_DBG(fmt, ...)
|
||||
#define LOG_INFO(fmt, ...)
|
||||
#define LOG_ERROR(fmt, ...)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// APBProxy.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by shouyi.www on 2017/3/29.
|
||||
// Copyright © 2017年 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface APBProxy : NSProxy
|
||||
|
||||
/**
|
||||
The proxy target.
|
||||
*/
|
||||
@property (nonatomic, weak, readonly) id target;
|
||||
|
||||
/**
|
||||
Creates a new weak proxy for target.
|
||||
|
||||
@param target Target object.
|
||||
|
||||
@return A new proxy object.
|
||||
*/
|
||||
- (instancetype)initWithTarget:(id)target;
|
||||
|
||||
/**
|
||||
Creates a new weak proxy for target.
|
||||
|
||||
@param target Target object.
|
||||
|
||||
@return A new proxy object.
|
||||
*/
|
||||
+ (instancetype)proxyWithTarget:(id)target;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// APBRequest.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by yukun.tyk on 11/9/15.
|
||||
// Copyright © 2015 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <DTFUtility/APBToygerBioBisConfigManager.h>
|
||||
@class UIViewController;
|
||||
|
||||
extern NSString *const kKeepUploadPageKey; //extInfo key: 生物识别产品是否要保持上传界面,默认不保持
|
||||
|
||||
@interface APBRequest : NSObject
|
||||
|
||||
@property(nonatomic, weak, readonly)UIViewController *vc; //显示的viewController
|
||||
@property(nonatomic, strong, readonly)APBToygerBioBisConfigManager *protocolModel; //服务端下发的配置参数
|
||||
@property(nonatomic, strong, readonly)NSDictionary *extInfo; //扩展业务参数
|
||||
|
||||
- (instancetype)initWithViewController:(UIViewController *)vc
|
||||
protocolModel:(APBToygerBioBisConfigManager *)protocolModel
|
||||
extInfo:(NSDictionary *)ext;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,67 @@
|
||||
//
|
||||
// APBResponse.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by yukun.tyk on 11/9/15.
|
||||
// Copyright © 2015 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
结果码定义
|
||||
*/
|
||||
typedef enum {
|
||||
APB_RESULT_SUCCESS = 500, //操作成功(不弹框)
|
||||
APB_RESULT_SUCCESS_VALIDATE_UPLOAD = 501, //操作成功(不弹框),合并上传
|
||||
APB_RESULT_SUCCESS_VALIDATE_OCRUPLOAD = 502, //EKYC OCR识别
|
||||
APB_RESULT_SUCCESS_VALIDATE_OCRUPLOAD_CONFIRM = 503, //EKYC OCR确认
|
||||
|
||||
APB_RESULT_CAMERA_PERMISSION_DENIED = 100, //无摄像头权限(弹框)
|
||||
APB_RESULT_CAMERA_DEVICE_UNSUPPORTED = 101, //摄像头不支持(弹框)
|
||||
APB_RESULT_CAMERA_CPU_UNSUPPORTED = 102, //CPU不支持(弹框)
|
||||
APB_RESULT_DEVICE_UNSUPPORTED = 103, //设备不支持(弹框)
|
||||
APB_RESULT_UNDEFINED_ERROR = 104, //其他异常(不弹框)
|
||||
|
||||
APB_RESULT_CAMERA_INIT_FAILED = 200, //摄像头初始化失败(不弹框)
|
||||
APB_RESULT_INVALID_ARGUMENT = 201, //无效的业务参数(不弹框)
|
||||
APB_RESULT_INTERRUPT = 202, //操作中断(弹框)
|
||||
APB_RESULT_TIMEOUT = 203, //操作超时(弹框)
|
||||
APB_RESULT_RESOURCE_ABSENCE = 204, //缺少资源文件(不弹框)
|
||||
APB_RESULT_SYSTEM_EXCEPT = 205, //系统异常(不弹框)
|
||||
APB_RESULT_ENGINE_EXCEPT = 206, //框架内部错误(不弹框)
|
||||
APB_RESULT_NETWORK_TIMEOUT = 207, //网络超时(弹框)
|
||||
APB_RESULT_SERVER_FAIL = 208, //服务端错误(弹框)
|
||||
APB_RESULT_RETRY_LIMIT = 209, //重试次数达到上限(弹框)
|
||||
APB_RESULT_AUTH_REJECT = 210, //用户拒绝人脸授权(弹框)
|
||||
APB_RESULT_NETWORK_FAIL = 211, //网络出错
|
||||
|
||||
APB_RESULT_USE_PASSWORD = 300, //用户选择账密登录(弹框)
|
||||
APB_RESULT_OTHER_VERIFICATION = 303, //其他核身方式
|
||||
APB_RESULT_LOCALVERIFY_FAIL = 304, //本地比对失败
|
||||
APB_RESULT_TOYGERSERVICE_FAILED = 305, //toyer 模型异常
|
||||
APB_RESULT_UPLOAD_IMAGE_NIL = 306, //上传的图片为空
|
||||
}APBResultType;
|
||||
|
||||
@interface APBResponse : NSObject
|
||||
|
||||
@property(nonatomic, assign)APBResultType resultType; //结果码
|
||||
@property(nonatomic, copy)NSString *failReason; //失败原因
|
||||
@property(nonatomic, copy)NSString *token; //bis token
|
||||
@property(nonatomic, strong)NSMutableDictionary *successResult; //成功结果
|
||||
@property (nonatomic,copy) NSString* retCodeSub ;
|
||||
@property (nonatomic,copy) NSString* retMessageSub ;
|
||||
|
||||
- (instancetype)initWithResultType:(APBResultType)type
|
||||
failReason:(NSString *)reason
|
||||
token:(NSString *)token
|
||||
retCodeSub:(NSString *)retCodeSub
|
||||
retMessageSub:(NSString *)retMessageSub
|
||||
successResult:(NSMutableDictionary *)result;
|
||||
|
||||
- (instancetype)initWithResultType:(APBResultType)type
|
||||
failReason:(NSString *)reason
|
||||
token:(NSString *)token
|
||||
successResult:(NSMutableDictionary *)result;
|
||||
|
||||
@end
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// APBTaskContext.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by yukun.tyk on 11/27/15.
|
||||
// Copyright © 2015 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "APBResponse.h"
|
||||
|
||||
/**
|
||||
任务状态定义
|
||||
*/
|
||||
typedef enum {
|
||||
STATE_NOT_RUNNING, //未运行
|
||||
STATE_RUNNING, //运行态
|
||||
STATE_FINISHED, //任务结束
|
||||
}APBTaskState;
|
||||
|
||||
@interface APBTaskContext : NSObject
|
||||
|
||||
@property(nonatomic, assign)APBTaskState state; //任务状态
|
||||
@property(nonatomic, assign)APBResultType resultCode; //任务结果码
|
||||
@property(nonatomic, copy)NSString *failReason; //任务失败原因
|
||||
@property(nonatomic, strong)NSMutableDictionary *successResult; //任务成功结果
|
||||
|
||||
@property (nonatomic,strong) NSString* retCodeSub ; //产品结果明细,不影响决策
|
||||
@property (nonatomic,strong) NSString* retMessageSub ; //retMessageSub对应的文案
|
||||
|
||||
@end
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
//
|
||||
// APFBehavlogManager.h
|
||||
// APFaceDetectBiz
|
||||
//
|
||||
// Created by yukun.tyk on 9/8/16.
|
||||
// Copyright © 2016 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class BisBehavLog, BisBehavTask;
|
||||
|
||||
@interface APBToygerBehavlogManager : NSObject
|
||||
|
||||
/**
|
||||
* @param config 配置参数,各种id和token
|
||||
*/
|
||||
- (instancetype)initWithConfig:(NSDictionary *)config;
|
||||
|
||||
/**
|
||||
* 添加行为日志
|
||||
*
|
||||
* @param task 任务
|
||||
*/
|
||||
- (void)addTask:(BisBehavTask *)task;
|
||||
|
||||
/**
|
||||
* clearTask
|
||||
*
|
||||
*
|
||||
*/
|
||||
- (void)clearTask;
|
||||
/**
|
||||
* 创建行为日志
|
||||
*
|
||||
* @param invtp 触发类型
|
||||
* @param retry 重试次数
|
||||
*
|
||||
* @return 行为日志
|
||||
*/
|
||||
- (BisBehavLog *)generateLogWithInvokeType:(NSString *)invtp
|
||||
withRetry:(NSInteger)retry;
|
||||
|
||||
@end
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
//
|
||||
// APFDataCenter.h
|
||||
// APFaceDetectBiz
|
||||
//
|
||||
// Created by yukun.tyk on 9/8/16.
|
||||
// Copyright © 2016 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <BioAuthEngine/BioAuthEngine.h>
|
||||
#import <DTFUtility/ToygerData.h>
|
||||
|
||||
@class BisBehavTask;
|
||||
|
||||
@protocol APBToygerDataCenterDelegate <NSObject>
|
||||
|
||||
/**
|
||||
* 收到response的回调
|
||||
* @param success rpc是否成功
|
||||
* @param retCode 结果码
|
||||
* @param msg 结果信息
|
||||
* @param ext 扩展信息
|
||||
*/
|
||||
- (void)didFinishUploadWithSuccess:(BOOL)success
|
||||
retCode:(NSString *)retCode
|
||||
retMessage:(NSString *)msg
|
||||
extInfo:(NSString *)ext;
|
||||
@end
|
||||
|
||||
|
||||
@interface APBToygerDataCenter : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString *pubkey;
|
||||
/**
|
||||
* 初始化
|
||||
*
|
||||
* @param config 配置参数
|
||||
*/
|
||||
- (instancetype)initWithConfig:(NSDictionary *)config;
|
||||
|
||||
|
||||
|
||||
#ifdef SUPPORT_PB
|
||||
|
||||
/**
|
||||
* 添加采集数据
|
||||
*
|
||||
* @param monitorImage 监控照片
|
||||
* @param panoImage 全景图,若该参数指定,将替换之前的全景图
|
||||
*/
|
||||
- (void)addMonitorImage:(UIImage *)monitorImage
|
||||
replacePanoImage:(NSData *)panoImage
|
||||
andCypherKeyData:(NSData *)cypherKey;
|
||||
|
||||
#else
|
||||
|
||||
/**
|
||||
* 添加采集数据
|
||||
*
|
||||
* @param monitorImage 监控照片
|
||||
* @param panoImage 全景图,若该参数指定,将替换之前的全景图
|
||||
*/
|
||||
- (void)addMonitorImage:(UIImage *)monitorImage
|
||||
replacePanoImage:(ToygerUploadContent *)panoImage
|
||||
andCypherKeyData:(NSString *)cypherKey;
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* 清除采集数据
|
||||
*
|
||||
* @param monitorImage 监控照片
|
||||
* @param panoImage 全景图,
|
||||
*/
|
||||
- (void)clearMonitorImage:(BOOL)monitor
|
||||
panoImage:(BOOL)pano;
|
||||
|
||||
/**
|
||||
* 添加行为日志
|
||||
*
|
||||
* @param task 任务
|
||||
*/
|
||||
- (void)addBehavTask:(BisBehavTask *)task;
|
||||
|
||||
/**
|
||||
* clearTask
|
||||
*
|
||||
*
|
||||
*/
|
||||
- (void)clearTask;
|
||||
/**
|
||||
* clear
|
||||
*
|
||||
*
|
||||
*/
|
||||
- (void)clear;
|
||||
|
||||
- (BOOL)hasFaceData;
|
||||
|
||||
/**
|
||||
* 建立上传数据request
|
||||
*
|
||||
* @param monitor 是否上传监控照片
|
||||
* @param behav 是否上传行为日志
|
||||
* @param pano 是否上传全景图
|
||||
* @param type 触发类型
|
||||
* @param retry 重试次数
|
||||
*/
|
||||
- (APBBisUploadGwRequest *)buildUploadRequestWithMonitorImage:(BOOL)monitor
|
||||
behavLog:(BOOL)behav
|
||||
panoImage:(BOOL)pano
|
||||
invokeType:(NSString *)type
|
||||
retryCnt:(NSInteger)retry;
|
||||
|
||||
- (APBBisUploadGwRequest *)buildUploadRequestWithRetryCnt:(NSInteger)retry;
|
||||
|
||||
- (NSString *)rsaImage:(NSString *)pubkey image:(UIImage *)image ;
|
||||
|
||||
|
||||
/**
|
||||
* 设置delegate
|
||||
*/
|
||||
- (void)setDelegate:(id<APBToygerDataCenterDelegate>)delegate;
|
||||
|
||||
@end
|
||||
+433
@@ -0,0 +1,433 @@
|
||||
//
|
||||
// BioAuthCommonSetting.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by shouyi.www on 2017/5/19.
|
||||
// Copyright © 2017年 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef BioAuthCommonSetting_h
|
||||
#define BioAuthCommonSetting_h
|
||||
|
||||
typedef NS_ENUM(NSUInteger, BioAuthAlertType) {
|
||||
BioAuthALert_Unknown,
|
||||
BioAuthAlert_Unsupport,
|
||||
BioAuthAlert_WrongSystemVersion,
|
||||
BioAuthAlert_SystemError,
|
||||
BioAuthAlert_NoCameraPermission,
|
||||
BioAuthAlert_Exit,
|
||||
BioAuthAlert_TimeOut,
|
||||
BioAuthAlert_Fail,
|
||||
BioAuthAlert_Limit,
|
||||
BioAuthAlert_NetworkError,
|
||||
BioAuthAlert_Interrupt,
|
||||
};
|
||||
|
||||
static NSString *const kBioAuthTipMoveClose = @"请离近一点";
|
||||
static NSString *const kBioAuthTipAdjustGesture = @"请调整姿势";
|
||||
static NSString *const kBioAuthTipMoveAway = @"请离远一点";
|
||||
static NSString *const kBioAuthTipKeepStill = @"请保持不动";
|
||||
static NSString *const kBioAuthStatusOk = @"Okay";
|
||||
static NSString *const kBioAuthStatusTooFar = @"too far";
|
||||
static NSString *const kBioAuthStatusTooClose = @"too close";
|
||||
static NSString *const kBioAuthStatusNoEye = @"no eye";
|
||||
|
||||
static NSString *const kBioAuthEyeStatus = @"eyestatus";
|
||||
static NSString *const kBioAuthGyroStatus = @"gyrostatus";
|
||||
static NSString *const kBioAuthEVVer = @"evVer";
|
||||
static NSString *const kBioAuthBVer = @"bEva";
|
||||
static NSString *const kBioAuthFEVer = @"feVer";
|
||||
static NSString *const kBioAuthEyeVerify = @"eyeverify";
|
||||
static NSString *const kBioAuthBisAction = @"bis_action";
|
||||
static NSString *const kBioAuthDetectEndTimeCost = @"kBioAuthDetectEndTimeCost";
|
||||
static NSString *const kBioAuthLiveBodyStartTime = @"kBioAuthLiveBodyStartTime";
|
||||
static NSString *const kBioAuthMonitorLoadDefaultConfig = @"loadDefaultConfig";
|
||||
|
||||
static NSString *const kBioAuthParamNetworkSuccess = @"networkSuccess";
|
||||
static NSString *const kBioAuthParamServerReturnCode = @"serverReturnCode";
|
||||
static NSString *const kBioAuthParamNetworkResult = @"networkResult";
|
||||
static NSString *const kBioAuthParamSceneCode = @"scenecode";
|
||||
static NSString *const kBioAuthParamLivenessLevel = @"livenesslevel";
|
||||
static NSString *const kBioAuthParamFail = @"failed";
|
||||
static NSString *const kBioAuthParamDiagnosticLogging = @"DiagnosticLogging";
|
||||
static NSString *const kBioAuthParamEyeScore = @"eyescore";
|
||||
static NSString *const kBioAuthParamHasFace = @"hasface";
|
||||
static NSString *const kBioAuthParamPicsScore = @"picscore";
|
||||
static NSString *const kBioAuthParamFaceScore = @"facescore";
|
||||
static NSString *const kBioAuthParamIKnown = @"我知道了";
|
||||
static NSString *const kBioAuthParamDeviceModelError = @"errorDeviceModel";
|
||||
static NSString *const kBioAuthParamLightDetection = @"lightdetection";
|
||||
static NSString *const kBioAuthParamLight = @"light";
|
||||
static NSString *const kBioAuthParamFace = @"face";
|
||||
static NSString *const kBioAuthParamQuality = @"quality";
|
||||
static NSString *const kBioAuthParamEyeDistance = @"eyedistance";
|
||||
static NSString *const kBioAuthParamFaceFarOrNear = @"faceFarorNear";
|
||||
static NSString *const kBioAuthParamFGROAngle = @"fgyroangle";
|
||||
static NSString *const kBioAuthParamOpenPage = @"openPage";
|
||||
static NSString *const kBioAuthParamServerFail = @"serverFail";
|
||||
static NSString *const kBioAuthParamNetworkFail = @"networkFail";
|
||||
static NSString *const kBioAuthParamNetworkError1006 = @"NetworkError1006";
|
||||
static NSString *const kBioAuthParamFaceFail = @"faceFail";
|
||||
static NSString *const kBioAuthParamUploadImageDataNil = @"uploadImageDataNil";
|
||||
static NSString *const kBioAuthParamAlertViewTitle = @"kBioAuthParamAlertViewTitle";
|
||||
static NSString *const kBioAuthParamAlertViewMessage = @"kBioAuthParamAlertViewMessage";
|
||||
static NSString *const kBioAuthParamAlertViewFirstButtonTitle = @"kBioAuthParamAlertViewFirstButtonTitle";
|
||||
static NSString *const kBioAuthParamAlertViewSecondButtonTitle = @"kBioAuthParamAlertViewSecondButtonTitle";
|
||||
static NSString *const kBioAuthParamAlertViewFirstCallback = @"kBioAuthParamAlertViewFirstCallback";
|
||||
static NSString *const kBioAuthParamAlertViewSecondCallback = @"kBioAuthParamAlertViewSecondCallback";
|
||||
static NSString *const kBioAuthParamAlertViewLogReason = @"kBioAuthParamAlertViewLogReason";
|
||||
static NSString *const kBioAuthParamAlertType = @"kBioAuthParamAlertType";
|
||||
|
||||
static NSString *const kBioAuthParamInterrupt = @"interrupt";
|
||||
static NSString *const kBioAuthParamCancel = @"cancel";
|
||||
static NSString *const kBioAuthParamLoadAlgorithmErr = @"loadAlgorithmErr";
|
||||
static NSString *const kBioAuthParamErrorMicriphone = @"errorMicrophone";
|
||||
static NSString *const kBioAuthParamVidCnt = @"vidcnt";
|
||||
static NSString *const kBioAuthParamFQuality = @"fquality";
|
||||
static NSString *const kBioAuthParamFCToken = @"fcToken";
|
||||
static NSString *const kBioAuthParamF = @"f";
|
||||
static NSString *const kBioAuthParamFC = @"fc";
|
||||
//static NSString *const kBioAuthFaceUrlPrefix = @"prefs://";
|
||||
|
||||
static NSString *const kBioAuthEVAssetsBundle = @"EyePrintAssets.bundle";
|
||||
|
||||
static NSString *const kBioAuthDirDocuments = @"Documents";
|
||||
static NSString *const kBioAuthDirBioAuth = @"BioAuth";
|
||||
static NSString *const kBioAuthDirAssetsFile = @"EyeVerify_Asset_Files";
|
||||
static NSString *const kBioAuthFailReasonEyeDetector = @"初始化eyeDetector失败";
|
||||
|
||||
static NSString *const kBioAuthFailReasonCreateTaskFail = @"创建眼纹检测任务失败";
|
||||
static NSString *const kBioAuthFailReasonCreateGyroTaskFail = @"创建陀螺仪检测任务失败";
|
||||
static NSString *const kBioAuthFailReasonFailToGetScanTask = @"扫脸任务无法获取scanTask";
|
||||
static NSString *const kBioAuthFailReasonViewControllerFail = @"无法获取viewController";
|
||||
static NSString *const kBioAuthFailReasonNoCameraPermission = @"没有摄像头权限";
|
||||
static NSString *const kBioAuthFailReasonWrongSystemVersion = @"操作系统版本太低";
|
||||
static NSString *const kBioAuthFailReasonUnsupportedDevice = @"不支持的设备";
|
||||
|
||||
static NSString *const kBioAuthTipSystemNotSupport = @"当前系统不支持刷脸";
|
||||
static NSString *const kBioAuthTipWrongSysVersion = @"刷脸仅在iOS8及以上版本可用";
|
||||
static NSString *const kBioAuthTipCameraNoPermission = @"无法启用相机";
|
||||
static NSString *const kBioAuthTipOpenCameraPermissionPath = @"请到“设置-隐私-相机”开启权限";
|
||||
static NSString *const kBioAuthTipCameraPermissionOpenNow = @"立即开启";
|
||||
static NSString *const kBioAuthTipQuit = @"退出";
|
||||
static NSString *const kBioAuthTipOk = @"确定";
|
||||
static NSString *const kBioAuthTipCancel = @"取消";
|
||||
static NSString *const kBioAuthTipOneMoreTime = @"再试一次";
|
||||
static NSString *const kBioAuthTipMakeSureToQuit = @"确定退出么?";
|
||||
static NSString *const kBioAuthTipOneFaceToPass = @"露个脸就能通过";
|
||||
static NSString *const kBioAuthTipTimeOut = @"操作超时";
|
||||
static NSString *const kBioAuthTipFaceFrontMakePassMoreEasier = @"提示:正对手机,更容易成功";
|
||||
static NSString *const kBioAuthTipFaceScanFail = @"刷脸失败";
|
||||
static NSString *const kBioAuthTipOperationFail = @"本次操作失败";
|
||||
static NSString *const kBioAuthTipNetworkFail = @"网络不给力";
|
||||
static NSString *const kBioAuthTipInterrupt = @"验证中断";
|
||||
|
||||
|
||||
static NSString *const kAFETimeoutMessage = @"kTimeoutMessage";
|
||||
|
||||
static NSString *const kBioAuthUnsupportedMedelMessage = @"kUnsupportedMedelMessage";
|
||||
static NSString *const kAFEUnsupportedSystemMessage = @"kUnsupportedSystemMessage";
|
||||
|
||||
static NSString *const kAFENoCameraPermissionOpen = @"kNoCameraPermissionOpen";
|
||||
static NSString *const kAFENoCameraPermissionCancel = @"kNoCameraPermissionCancel";
|
||||
static NSString *const kAEFNoCameraPermissionTitle = @"kNoCameraPermissionTitle";
|
||||
static NSString *const kAFENoCameraPermissionDetail = @"kNoCameraPermissionDetail";
|
||||
|
||||
static NSString *const kAFELocalizedNetworkError = @"kNetworkErrorMessage";
|
||||
|
||||
|
||||
|
||||
static NSString *const kAFELocalizedFaceFailTitle = @"kFaceFailTitle";
|
||||
static NSString *const kAFELocalizedFaceFailMsg = @"kFaceFailMessage";
|
||||
static NSString *const kAFELocalizedCancelTitle = @"kCancelTitle";
|
||||
static NSString *const kAFELocalizedCancelLoginMsg = @"kCancelLoginMessage";
|
||||
static NSString *const kAFELocalizedCancelSampleMsg = @"kCancelSampleMessage";
|
||||
|
||||
static NSString *const kCherryAglErrorTips = @"kCherryAglErrorTips";
|
||||
static NSString *const kCherryOtherLoginButton = @"kCherryOtherLoginButton";
|
||||
static NSString *const kCherryLoginHomeEvent = @"kCherryLoginHomeEvent";
|
||||
static NSString *const kCherrySampleHomeEvent = @"kCherrySampleHomeEvent";
|
||||
static NSString *const kCherryExitButton = @"kCherryExitButton";
|
||||
static NSString *const kCherryOpenButton = @"kCherryOpenButton";
|
||||
static NSString *const kCherryRetryButton = @"kCherryRetryButton";
|
||||
static NSString *const kContextRetryLimit = @"kRetryLimit";
|
||||
static NSString *const kCherryTimeout = @"kCherryTimeout";
|
||||
static NSString *const kCherryTipMessage = @"kCherryTipMessage";
|
||||
static NSString *const kCherryDetectTask = @"cherryDetectTask";
|
||||
static NSString *const kCherryAdjustPosTip = @"kcherryAdjustPosTip";
|
||||
static NSString *const kCherryNofaceTip = @"kCherryNofaceTip";
|
||||
static NSString *const kCherryCancelLogin = @"kCherryCancelLogin";
|
||||
static NSString *const kCherryCancelSample = @"kCherryCancelSample";
|
||||
static NSString *const kCherryCancelSampleMessage = @"kCherryCancelSampleMessage";
|
||||
|
||||
static NSString *const kAFEStatusUpdate = @"statusupdate";
|
||||
|
||||
static NSString *const kSceneRetryLimit = @"retryLimit";
|
||||
static NSString *const kAFERetryLimit = @"retryLimit";
|
||||
|
||||
static NSString *const kCherryUnderExposure = @"kCherryUnderExposure";
|
||||
static NSString *const kCherryFaceTooSmall = @"kCherryFaceTooSmall";
|
||||
static NSString *const kCherryFaceIncomplete = @"kCherryFaceIncomplete";
|
||||
static NSString *const kCherryYawFail = @"kCherryYawFail";
|
||||
static NSString *const kCherryTremble = @"kCherryTremble";
|
||||
|
||||
static NSString *const kCherryCancleButton = @"kCherryCancleButton";
|
||||
static NSString *const kCherryEnterButton = @"kCherryEnterButton";
|
||||
static NSString *const kIKnowButton = @"kIKnowButton";
|
||||
static NSString *const kNoMicPermissionTitle = @"kNoMicPermissionTitle";
|
||||
static NSString *const kNoMicPermissionMsg = @"kNoMicPermissionMsg";
|
||||
|
||||
static NSString *const kSceneCircularViewFail = @"AFECircularViewFail";
|
||||
|
||||
static NSString *const kCherryDetectFlagBlink = @"kCherryDetectFlagBlink";
|
||||
static NSString *const kCherryDetectFlagPosQuality = @"kCherryDetectFlagPosQuality";
|
||||
static NSString *const kCherryDetectFlagPosCond = @"kCherryDetectFlagPosCond";
|
||||
|
||||
static NSString *const kAFENetworkType = @"networkType";
|
||||
static NSString *const kBioAuthParamSensor = @"sensor";
|
||||
static NSString *const kBioAuthParamTotalSteps = @"tsteps";
|
||||
static NSString *const kBioAuthNotifiUploadTaskBeginNotiName = @"afeuploadtaskbegin";
|
||||
static NSString *const kBioAuthParamAlertShowKey = @"alert";
|
||||
static NSString *const kBioAuthParamCaptureView = @"captureView";
|
||||
static NSString *const kBioAuthParamScanView = @"scanview";
|
||||
static NSString *const kBioAuthPramBizInfoForKey = @"biz";
|
||||
static NSString *const kBioAuthParamStepsUploaded = @"upsteps";
|
||||
static NSString *const kBioAuthParamEnvStatus = @"envstatus";
|
||||
static NSString *const kBioAuthParamRetryNum = @"retry";
|
||||
static NSString *const kBioAuthParamCurrentTransactionSteps = @"transactionSteps";
|
||||
static NSString *const kBioAuthParamSound = @"sound";
|
||||
static NSString *const kBioAuthParamUID = @"UID";
|
||||
static NSString *const kBioAuthParamAction = @"SCENE_ID";
|
||||
static NSString *const kBioAuthParamCurrentView = @"currentView";
|
||||
|
||||
static NSString * const kAPFParentViewControllerKey = @"parentViewController";
|
||||
static NSString * const kAPFCurrentViewControllerKey = @"currentViewController";
|
||||
|
||||
static NSString * const kAPFCurrentRetryCntKey = @"currentRetryCnt";
|
||||
static NSString * const kAPFSoundStatusKey = @"soundStatus";
|
||||
static NSString * const kAPFIsLoginModeKey = @"isLoginMode";
|
||||
static NSString * const kAPFBisConfigModelKey = @"APFBisConfigModel";
|
||||
static NSString * const kAPFBisTokenKey = @"bis_token";
|
||||
static NSString * const kAPFUploadViewPic = @"kUploadViewPic";
|
||||
static NSString * const kAPFAcionListKey = @"kActionList";
|
||||
static NSString * const kAPFPresentTimeKey = @"kPresentTime";
|
||||
|
||||
static NSString *const kBioAuthApdidKey = @"APDID";
|
||||
static NSString *const kBioAuthTokenidKey = @"TOKEN_ID";
|
||||
static NSString *const kBioAuthSceneIdKey = @"sceneId";
|
||||
static NSString *const kBioAuthSceneNameKey = @"SCENE_NAME";
|
||||
static NSString *const kBioAuthAppidKey = @"appID";
|
||||
static NSString *const kBioAuthExtInfo = @"extInfo";
|
||||
static NSString *const kBioAuthParamType = @"type";
|
||||
static NSString *const kBioAuthParamSampleMode = @"samplemode";
|
||||
static NSString *const kBioAuthParamPubKey = @"pubkey";
|
||||
static NSString *const kBioAuthParamPermissionKey = @"audioPermissionKey";
|
||||
static NSString *const kBioAuthParamBizInfoKey = @"bizinfo";
|
||||
static NSString *const kBioAuthParamBestImage = @"bestimage";
|
||||
static NSString *const kBioAuthParamImageQuality = @"bestimagequality";
|
||||
static NSString *const kBioAuthParamMineCount = @"minecount";
|
||||
static NSString *const kBioAuthParamLoggingLevel = @"LoggerLevel";
|
||||
static NSString *const kBioAuthParamLevelHigh = @"level1";
|
||||
static NSString *const kBioAuthParamLevelMedium = @"level2";
|
||||
static NSString *const kBioAuthParamLevelLow = @"level3";
|
||||
|
||||
static NSString *const kBioAuthParamNLSAppKey = @"121312323a123-ios";
|
||||
static NSString *const kBioAuthParamAsrRequest = @"asr_usr_id";
|
||||
static NSString *const kBioAuthParamNLSSVCUrl = @"ws://speechapi.m.taobao.com";
|
||||
static NSString *const kBioAuthParamFppVer = @"fppVer";
|
||||
static NSString *const kBioAuthParamFVer = @"fVer";
|
||||
static NSString *const kBioAuthParamFaceDetect = @"facedetect";
|
||||
static NSString *const kBioAuthParamProduct = @"product";
|
||||
static NSString *const kBioAuthParamCherry = @"cherry";
|
||||
static NSString *const kBioAuthParamStock = @"stock";
|
||||
static NSString *const kBioAuthEngine = @"BioAuthEngine";
|
||||
static NSString *const kBioAuthFaceNavigation = @"faceNavigation";
|
||||
static NSString *const kBioAuthTypeHTML = @"htm";
|
||||
static NSString *const kBioAuthTypeBundle = @"bundle";
|
||||
|
||||
static NSString *const kAPFWaveUploadKey = @"waveUploadKey";
|
||||
static NSString *const kAPFCameraViewKey = @"cameraViewKey";
|
||||
|
||||
static NSString *const kAFELocalizedLoginFailTooManyTimes = @"kLoginFailTooManyTimesMessage";
|
||||
static NSString *const kAFELoginFailTooManyTimesMessage = @"kLoginFailTooManyTimesMessage";
|
||||
|
||||
static NSString *const kAFELocalizedLock = @"kLockMessage";
|
||||
static NSString *const kAFELockMessage = @"kLockMessage";
|
||||
|
||||
static NSString *const kAFELocalizedRetryTitle = @"kRetryTitle";
|
||||
static NSString *const kAFERetryTitle = @"kRetryTitle";
|
||||
|
||||
static NSString *const kAFELocalizedPassWdTitle = @"kUsePasswordTitle";
|
||||
static NSString *const kAFEUsePasswordTitle = @"kUsePasswordTitle";
|
||||
|
||||
static NSString *const kAFELocalizedExitTitle = @"kExitTitle";
|
||||
static NSString *const kAFEExitTitle = @"kExitTitle";
|
||||
|
||||
static NSString *const kAFELocalizedIKnowTitle = @"kIKnowTitle";
|
||||
static NSString *const kAFEIKnowTitle = @"kIKnowTitle";
|
||||
|
||||
static NSString *const kBioAuthParamTimeout = @"timeout";
|
||||
static NSString *const kBioAuthParamClickXBack = @"clickXback";
|
||||
static NSString *const kBioAuthParamSystemInterrupt = @"systemInterrupt";
|
||||
static NSString *const kBioAuthParamProcessInterrupt = @"processInterrupt";
|
||||
static NSString *const kBioAuthParamCameraPermission = @"cameraPermission";
|
||||
static NSString *const kBioAuthParamCameraOpenFail = @"cameraOpenFail";
|
||||
static NSString *const kBioAuthParamErrorSystemVersion = @"errorSystemVersion";
|
||||
static NSString *const kBioAuthParamReason = @"reason";
|
||||
static NSString *const kBioAuthParamMoniton = @"motion";
|
||||
static NSString *const kBioAuthParamFrameMoniton = @"frameMotion";
|
||||
static NSString *const kBioAuthParamChoose = @"choose";
|
||||
static NSString *const kBioAuthParamTimeCost = @"timecost";
|
||||
static NSString *const kBioAuthParamReturnCode = @"returnCode";
|
||||
static NSString *const kBioAuthParamFrontCamera = @"frontCamera";
|
||||
static NSString *const kBioAuthParamBackCamera = @"backCamera";
|
||||
static NSString *const kBioAuthParamMemory = @"memory";
|
||||
static NSString *const kBioAuthParamProcessorNum = @"processorNum";
|
||||
static NSString *const kBioAuthParamTotalStorage = @"totalStorage";
|
||||
static NSString *const kBioAuthParamAvailableStorage = @"availableStorage";
|
||||
static NSString *const kBioAuthParamBisToken = @"bistoken";
|
||||
static NSString *const kBioAuthParamAlgorithmIntTime = @"inttime";
|
||||
static NSString *const kBioAuthParamAlgorithmName = @"name";
|
||||
static NSString *const kBioAuthParamUploadRequest = @"uploadrequest";
|
||||
static NSString *const kBioAuthParamBisCfg = @"biscfg";
|
||||
static NSString *const kBioAuthParamUserId = @"USER_ID";
|
||||
static NSString *const kBioAuthParamBioType = @"bioType";
|
||||
static NSString *const kBioAuthParamLogType = @"logType";
|
||||
static NSString *const kBioAuthParamUIVersion = @"ui_version";
|
||||
static NSString *const kBioAuthFailReasonUserQuit = @"用户主动退出";
|
||||
static NSString *const kBioAuthVerifyId = @"verifyId";
|
||||
static NSString *const kBioAuthParamToygerInit = @"toygerInit";
|
||||
static NSString *const kBioAuthParamToygerFileState = @"toygerFileState";
|
||||
static NSString *const kBioAuthFailInsufficientDisk = @"手机存储空间不足";
|
||||
static NSString *const kBioAuthFailNoPermissionRecording = @"没有录音权限";
|
||||
|
||||
#pragma mark - 埋点相关 -
|
||||
|
||||
static NSString *const kBioAuthMonitorAlertAppear = @"AlertAppear";
|
||||
static NSString *const kBioAuthMonitorAlertAppearUCID = @"UC-YWRLSB-161114-21";
|
||||
|
||||
static NSString *const kBioAuthMonitorAlertClose = @"AlertChoose";
|
||||
static NSString *const kBioAuthMonitorAlertCloseUCID = @"UC-YWRLSB-161114-22";
|
||||
|
||||
static NSString *const kBioAuthMonitorDetectionStart = @"EnterDetectionStart";
|
||||
static NSString *const kBioAuthMonitorDetectionStartUCID = @"UC-YWRLSB-161114-07";
|
||||
|
||||
static NSString *const kBioAuthMonitorDetectionEnd = @"EnterDetectionEnd";
|
||||
static NSString *const kBioAuthMonitorDetectionEndUCID = @"UC-YWRLSB-161114-08";
|
||||
|
||||
static NSString *const kBioAuthMonitorDetectionCondStart = @"detectCondStart";
|
||||
static NSString *const kBioAuthMonitorDetectionCondStartUCID = @"UC-YWRLSB-161114-09";
|
||||
|
||||
static NSString *const kBioAuthMonitorSensorSlice = @"sensorSlice";
|
||||
static NSString *const kBioAuthMonitorSensorSliceUCID = @"UC-YWRLSB-161114-20";
|
||||
|
||||
static NSString *const kBioAuthMonitorPoseStart = @"poseStart";
|
||||
static NSString *const kBioAuthMonitorPoseStartUCID = @"UC-YWRLSB-161114-11";
|
||||
|
||||
static NSString *const kBioAuthMonitorLiveBodyStart = @"livebodyStart";
|
||||
static NSString *const kBioAuthMonitorLiveBodyStartUCID = @"UC-YWRLSB-161114-13";
|
||||
|
||||
static NSString *const kBioAuthMonitorLiveBodyEnd = @"livebodyEnd";
|
||||
static NSString *const kBioAuthMonitorLiveBodyEndUCID = @"UC-YWRLSB-161114-14";
|
||||
|
||||
static NSString *const kBioAuthMonitorPromptCopyPoint = @"promptCopyPoint";
|
||||
static NSString *const kBioAuthMonitorPromptCopyPointUCID = @"UC-YWRLSB-161114-17";
|
||||
|
||||
static NSString *const kBioAuthParamEvent = @"event";
|
||||
|
||||
static NSString *const kBioAuthMonitorPoseCheckEnd = @"poseCheckEnd";
|
||||
static NSString *const kBioAuthMonitorPoseCheckEndUCID = @"UC-YWRLSB-161114-28";
|
||||
|
||||
static NSString *const kBioAuthMonitorAlgorithm = @"Algorithm";
|
||||
static NSString *const kBioAuthMonitorAlgorithmUCID = @"UC-YWRLSB-161114-27";
|
||||
|
||||
static NSString *const kBioAuthMonitorFromH5 = @"fromH5";
|
||||
|
||||
static NSString *const kBioAuthMonitorEnterGuidePage = @"enterGuidePage";
|
||||
static NSString *const kBioAuthMonitorEnterGuidePageUCID = @"UC-YWRLSB-161114-02";
|
||||
|
||||
static NSString *const kBioAuthMonitorExitGuidePage = @"exitGuidePage";
|
||||
static NSString *const kBioAuthMonitorExitGuidePageUCID = @"UC-YWRLSB-161114-03";
|
||||
|
||||
static NSString *const kBioAuthMonitorClickStartCapture = @"clickStartCapture";
|
||||
static NSString *const kBioAuthMonitorClickStartCaptureForSuitable = @"suitable";
|
||||
static NSString *const kBioAuthMonitorClickStartCaptureForSuitableError = @"suitableError";
|
||||
static NSString *const kBioAuthMonitorClickStartCaptureUCID = @"UC-YWRLSB-161114-04";
|
||||
|
||||
static NSString *const kBioAuthMonitorEntrySDK = @"entrySDK";
|
||||
static NSString *const kBioAuthMonitorEntrySDKUCID = @"UC-YWRLSB-161114-01";
|
||||
|
||||
static NSString *const kBioAuthMonitorCallbackVerifySystem = @"callbackVerifySystem";
|
||||
static NSString *const kBioAuthMonitorCallbackVerifySystemUCID = @"UC-YWRLSB-161114-23";
|
||||
|
||||
static NSString *const kBioAuthMonitorExitSDK = @"exitSDK";
|
||||
static NSString *const kBioAuthMonitorExitSDKUCID = @"UC-YWRLSB-161114-24";
|
||||
|
||||
static NSString *const kBioAuthMonitorFaceMine = @"facemine";
|
||||
static NSString *const kBioAuthMonitorFaceMineUCID = @"UC-DXSPRLSB-161206-10";
|
||||
|
||||
static NSString *const kBioAuthMonitorBrightness = @"brightness";
|
||||
static NSString *const kBioAuthMonitorBrightnessUCID = @"UC-YWRLSB-161207-01";
|
||||
|
||||
static NSString *const kBioAuthLoadLocalGuidePage = @"loadLocalGuidePage";
|
||||
static NSString *const kBioAuthLoadLocalGuidePageUCID = @"UC-YWRLSB-160422-02";
|
||||
|
||||
static NSString *const kBioAuthUploadEnd = @"uploadEnd";
|
||||
static NSString *const kBioAuthUploadEndUCID = @"UC-YWRLSB-161114-16";
|
||||
|
||||
static NSString *const kBioAuthuploadAvarriable = @"uploadAvarriable";
|
||||
static NSString *const kBioAuthuploadAvarriableUCID = @"UC-YWRLSB-161114-25";
|
||||
|
||||
static NSString *const kBioAuthUploadStart = @"uploadStart";
|
||||
static NSString *const kBioAuthUploadStartUCID = @"UC-YWRLSB-161114-15";
|
||||
|
||||
static NSString *const kBioAuthDetectCondEnd = @"detectCondEnd";
|
||||
static NSString *const kBioAuthDetectCondEndUCID = @"UC-YWRLSB-161114-10";
|
||||
|
||||
static NSString *const kBioAuthDetectFaceSuccess = @"detectFaceSuccess";
|
||||
static NSString *const kBioAuthDetectFaceSuccessUCID = @"UC-YWRLSB-161114-28";
|
||||
|
||||
static NSString *const kBioAuthDetectEyeSuccess = @"detectEyeSuccess";
|
||||
static NSString *const kBioAuthDetectEyeSuccessUCID = @"UC-YWRLSB-161114-29";
|
||||
|
||||
static NSString *const kBioAuthMonitorEyeLivebodyDetectStart = @"eyeLivebodyDetectStart";
|
||||
static NSString *const kBioAuthMonitorEyeLivebodyDetectStartUCID = @"UC-YWRLSB-161114-30";
|
||||
|
||||
static NSString *const kBioAuthMonitorEyeLivebodyDetectEnd = @"eyeLivebodyDetectEnd";
|
||||
static NSString *const kBioAuthMonitorEyeLivebodyDetectEndUCID = @"UC-YWRLSB-161114-31";
|
||||
|
||||
static NSString *const kBioAuthMonitorEyeSlice = @"eyeSlice";
|
||||
static NSString *const kBioAuthMonitorEyeSliceUCID = @"UC-YWRLSB-161114-19";
|
||||
static NSString *const kBioAuthCardFace = @"cardface";
|
||||
|
||||
#pragma mark - 埋点相关 -
|
||||
|
||||
static NSString *const kBioAuthMonitorFcEntrySDK = @"fcEntrySDK";
|
||||
static NSString *const kBioAuthMonitorFcEntrySDKUCID = @"UC-RZHY-170118-01";
|
||||
|
||||
static NSString *const kBioAuthMonitorFcGetParameter = @"fcGetParameters";
|
||||
static NSString *const kBioAuthMonitorFcGetParameterUCID = @"UC-RZHY-170118-02";
|
||||
|
||||
static NSString *const kBioAuthMonitorFcFaceCallbackBisSystem = @"fcFaceCallbackBisSystem";
|
||||
static NSString *const kBioAuthMonitorFcFaceCallbackBisSystemUCID = @"UC-RZHY-170118-27";
|
||||
|
||||
static NSString *const kBioAuthMonitorFcFaceGetServerResult = @"fcFaceGetServerResult";
|
||||
static NSString *const kBioAuthMonitorFcFaceGetServerResultUCID = @"UC-RZHY-170118-28";
|
||||
|
||||
static NSString *const kBioAuthMonitorFcCallbackVerifySystem = @"fcCallbackVeritySystem";
|
||||
static NSString *const kBioAuthMonitorFcCallbackVerifySystemUCID = @"UC-RZHY-170118-29";
|
||||
|
||||
static NSString *const kBioAuthFcExitSDK = @"fcExitSDK";
|
||||
static NSString *const kBioAuthFcExitSDKUCID = @"UC-RZHY-170118-30";
|
||||
|
||||
static NSString *const kBioAuthValidateRequestKey = @"validateRequest";
|
||||
static NSString *const kBioAuthMergeValidateKey = @"mergeValidate";
|
||||
|
||||
#pragma mark - 网络相关 -
|
||||
static NSString *const kAPBGWOperationType = @"oprationType"; //NSString, oprationType
|
||||
static NSString *const kAPBGWReturnType = @"returnType"; //NSString, returnType
|
||||
static NSString *const kAPBGWGatewayURL = @"gatewayURL"; //NSString, gatewayURL
|
||||
static NSString *const kAPBGWBackupURL = @"backupURL"; //NSString, backupUrl
|
||||
static NSString *const kAPBGWHeadConfig = @"headConfig";
|
||||
#endif /* BioAuthCommonSetting_h */
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// BioAuthEngine.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by richard on 20/09/2017.
|
||||
// Copyright © 2017 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef BioAuthEngine_h
|
||||
#define BioAuthEngine_h
|
||||
|
||||
#import <BioAuthEngine/APBBehavLogModel.h>
|
||||
#import <BioAuthEngine/NSTimer+bioAuth.h>
|
||||
|
||||
#import <BioAuthEngine/APBAlertController.h>
|
||||
#import <BioAuthEngine/UIImage+bioAuth.h>
|
||||
|
||||
#import <BioAuthEngine/AFEUploadView.h>
|
||||
#import <BioAuthEngine/AFEScanViewDelegate.h>
|
||||
#import <BioAuthEngine/AFEAlertView.h>
|
||||
#import <BioAuthEngine/AFECircularView.h>
|
||||
#import <BioAuthEngine/AFEWebGuideView.h>
|
||||
#import <BioAuthEngine/APBDTFUploadToastView.h>
|
||||
|
||||
#import <BioAuthEngine/AFEStatusBar.h>
|
||||
#import <BioAuthEngine/AFECircleProgressBar.h>
|
||||
|
||||
#import <BioAuthEngine/APBEvent.h>
|
||||
#import <BioAuthEngine/IBioAuthFactor.h>
|
||||
#import <BioAuthEngine/IBioAuthTask.h>
|
||||
#import <BioAuthEngine/APBTaskContext.h>
|
||||
#import <BioAuthEngine/APBBackwardCommand.h>
|
||||
#import <BioAuthEngine/NSTimer+bioAuth.h>
|
||||
#import <BioAuthEngine/APBAuthEngine.h>
|
||||
#import <BioAuthEngine/BioAuthCommonSetting.h>
|
||||
#import <BioAuthEngine/APBConfig.h>
|
||||
#import <BioAuthEngine/APBBisRequestBuilder.h>
|
||||
#import <BioAuthEngine/DTFFaceViewProtocol.h>
|
||||
#import <BioAuthEngine/DTFOCRViewProtocol.h>
|
||||
#endif /* BioAuthEngine_h */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#import <BioAuthEngine/DTFUIElementManager.h>
|
||||
#import <BioAuthEngine/APBGatewayFacade.h>
|
||||
#import <BioAuthEngine/APBProxy.h>
|
||||
#import <BioAuthEngine/APBFaceVerifyInfo.h>
|
||||
#import <BioAuthEngine/APBAuthFacade.h>
|
||||
#import <BioAuthEngine/DTFTextLayer.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for BioAuthEngine.
|
||||
FOUNDATION_EXPORT double BioAuthEngineVersionNumber;
|
||||
|
||||
//! Project version string for BioAuthEngine.
|
||||
FOUNDATION_EXPORT const unsigned char BioAuthEngineVersionString[];
|
||||
@@ -0,0 +1,67 @@
|
||||
//
|
||||
// BioAuthFacade.h
|
||||
// BioAuthAPI
|
||||
//
|
||||
// Created by yukun.tyk on 12/7/15.
|
||||
// Copyright © 2015 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "APBRequest.h"
|
||||
#import "APBResponse.h"
|
||||
#import "APBCommand.h"
|
||||
|
||||
/**
|
||||
* 生物认证结果回调处理
|
||||
*
|
||||
* @param response 生物认证结果
|
||||
*/
|
||||
typedef void (^BioAuthCallback) (APBResponse *response);
|
||||
|
||||
/**
|
||||
* 执行命令结束回调
|
||||
*
|
||||
* @param success 命令执行是否成功
|
||||
* @param reason 保留参数
|
||||
*/
|
||||
typedef void (^BioAuthExecCallback) (BOOL success, NSDictionary *reason);
|
||||
|
||||
@interface BioAuthFacade : NSObject
|
||||
|
||||
/**
|
||||
* 唤起生物认证之前获取框架meta数据
|
||||
*/
|
||||
+ (NSString *)getBioMetaInfo;
|
||||
|
||||
/**
|
||||
* 触发下载资源文件
|
||||
*/
|
||||
+ (void)preLoad;
|
||||
|
||||
/**
|
||||
* 申请生物认证
|
||||
*
|
||||
* @param request 生物认证请求
|
||||
* @param callback 生物认证结果回调处理
|
||||
*/
|
||||
- (void)authWithRequest:(APBRequest *)request withCallback:(BioAuthCallback)callback;
|
||||
|
||||
/**
|
||||
* 让正在进行中的生物认证因子执行某种操作
|
||||
*
|
||||
* @param command 操作码
|
||||
* @param callback 命令执行回调
|
||||
*/
|
||||
- (void)exec:(APBCommand *)command withCompletionCallback:(BioAuthExecCallback)callback;
|
||||
|
||||
/**
|
||||
* 当前是否正在执行认证任务
|
||||
*/
|
||||
- (BOOL)isBusy;
|
||||
|
||||
/**
|
||||
* 生物认证类型版本号
|
||||
*/
|
||||
- (NSString *)version;
|
||||
|
||||
@end
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// APFViewController.h
|
||||
// APFaceDetectBiz
|
||||
//
|
||||
// Created by 晗羽 on 8/25/16.
|
||||
// Copyright © 2016 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "IBioAuthTask.h"
|
||||
|
||||
@interface DTFBaseViewController : UIViewController
|
||||
|
||||
@property(nonatomic, assign) BOOL isClose;
|
||||
@property(nonatomic, strong) NSString *platformInfo;
|
||||
@property(nonatomic, strong) UIActivityIndicatorView *activityIndicatorView;
|
||||
@property(nonatomic, weak) id<IBioAuthTask> currentTask;
|
||||
|
||||
- (void)addWebGuideView:(UIView *)guideView;
|
||||
- (void)showLoadingView;
|
||||
- (void)dismissLoadingView;
|
||||
@end
|
||||
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// DTFColorModel.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by 汪澌哲 on 2024/1/23.
|
||||
// Copyright © 2024 Alipay. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface DTFColorModel : NSObject
|
||||
@property (nonatomic, strong) UIColor *titleColor;
|
||||
@property (nonatomic, strong) UIColor *msgColor;
|
||||
@property (nonatomic, strong) UIColor *cancelColor;
|
||||
@property (nonatomic, strong) UIColor *confirmColor;
|
||||
@property (nonatomic, strong) UIColor *cancelBGColor;
|
||||
@property (nonatomic, strong) UIColor *confirmBGColor;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// DTFCustomActivityIndicator.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by 汪澌哲 on 2024/1/16.
|
||||
// Copyright © 2024 Alipay. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface DTFCustomActivityIndicator : UIImageView
|
||||
- (instancetype)initWithImage:(UIImage *)image frame:(CGRect)frame;
|
||||
- (void)startAnimating;
|
||||
- (void)stopAnimating;
|
||||
- (BOOL)isAnimating;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// DTFCustomAlertView.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by 汪澌哲 on 2024/1/10.
|
||||
// Copyright © 2024 Alipay. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "DTFColorModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSInteger, DTFAlertActionType) {
|
||||
DTFAlertActionTypeConfirm,
|
||||
DTFAlertActionTypeCancel
|
||||
};
|
||||
|
||||
@interface DTFCustomAlertAction : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString *title;
|
||||
@property (nonatomic, assign) DTFAlertActionType type;
|
||||
@property (nonatomic, copy) void (^handler)(void);
|
||||
|
||||
- (instancetype)initWithTitle:(NSString *)title type:(DTFAlertActionType)type handler:(void (^)(void))handler;
|
||||
|
||||
@end
|
||||
|
||||
@interface DTFCustomAlertView : UIView
|
||||
@property (nonatomic, copy) NSString *titleText;
|
||||
@property (nonatomic, copy) NSString *messageText;
|
||||
@property (nonatomic, copy) NSString *cancelText;
|
||||
@property (nonatomic, copy) NSString *sureText;
|
||||
@property (nonatomic, assign) CGRect infoRect;
|
||||
@property (nonatomic, strong) NSMutableArray<DTFCustomAlertAction *> *actions;
|
||||
@property (nonatomic, copy) void(^cancelButtonAction)(void);
|
||||
@property (nonatomic, copy) void(^sureButtonAction)(void);
|
||||
@property (nonatomic, strong) UIViewController *vc;
|
||||
|
||||
@property (strong, nonatomic) UIView *bgView;
|
||||
@property (strong, nonatomic) UIView *bgMaskView;
|
||||
@property (strong, nonatomic) UIView *lineView;
|
||||
@property (strong, nonatomic) UIView *linesView;
|
||||
@property (strong, nonatomic) UILabel *titleLabel;
|
||||
@property (strong, nonatomic) UILabel *messageLabel;
|
||||
@property (assign, nonatomic) BOOL isPermission;
|
||||
@property (strong, nonatomic) DTFColorModel *colorModel;
|
||||
@property (strong, nonatomic) NSMutableArray *alertBtnArray;
|
||||
@property (strong, nonatomic) UIFont *font;
|
||||
|
||||
|
||||
- (instancetype)initWithTitle:(NSString *)title message:(NSString *)message;
|
||||
- (void)addAction:(DTFCustomAlertAction *)action;
|
||||
- (void)show;
|
||||
// 隐藏
|
||||
- (void)hide;
|
||||
|
||||
+(void)showCustomAlertWithTitle:(NSString *)title message:(NSString *)message colorModel:(DTFColorModel *)colorModel actions:(NSArray <DTFCustomAlertAction *>*)actions fromeVC:(UIViewController *)vc;
|
||||
|
||||
+(void)showPermissionAlertWithTitle:(NSString *)title message:(NSString *)message fromeVC:(UIViewController *)vc;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// DTFFaceView.h
|
||||
// MultiFactorFacade
|
||||
//
|
||||
// Created by mengbingchuan on 2022/6/22.
|
||||
// Copyright © 2022 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "DTFFaceViewProtocol.h"
|
||||
|
||||
typedef NS_ENUM(NSInteger, DTFAuthScene) {
|
||||
DTFAuthSceneFace = 1, //刷脸
|
||||
DTFAuthSceneMultiFactor = 2, //意愿
|
||||
};
|
||||
|
||||
@interface DTFFaceView : UIView<DTFFaceViewProtocol>
|
||||
|
||||
@property(nonatomic, assign) DTFAuthScene authScene;
|
||||
@property(nonatomic, strong) NSString *platformInfo;
|
||||
@property(nonatomic, assign) BOOL isSuitable;
|
||||
|
||||
- (instancetype)initWithAuthScene:(DTFAuthScene)authScene platformInfo:(NSString *)platformInfo isSuitable:(BOOL)isSuitable;
|
||||
|
||||
- (instancetype)initWithAuthScene:(DTFAuthScene)authScene;
|
||||
|
||||
- (void)setScreenRotation:(BOOL)isRotation;
|
||||
|
||||
- (void)setPlayBtnIcon;
|
||||
@end
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
//
|
||||
// DTFFaceViewProtocol.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by mengbingchuan on 2022/8/29.
|
||||
// Copyright © 2022 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIkit.h>
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
|
||||
typedef NS_ENUM(NSInteger, DTFFaceStateMessage) {
|
||||
DTF_Message_Image_Perfect = 0,
|
||||
DTF_Message_No_Face,
|
||||
DTF_Message_Distance_Too_Far,
|
||||
DTF_Message_Distance_Too_Close,
|
||||
DTF_Message_Face_Not_In_Center,
|
||||
DTF_Message_Bad_Pitch,
|
||||
DTF_Message_Bad_Yaw,
|
||||
DTF_Message_Is_Moving,
|
||||
DTF_Message_Bad_Brightness,
|
||||
DTF_Message_Bad_Quality,
|
||||
DTF_Message_Bad_Eye_Openness,
|
||||
DTF_Message_Blink_Openness,
|
||||
DTF_Message_Left_Yaw,
|
||||
DTF_Message_Right_Yaw,
|
||||
DTF_Message_Mouth_Open,
|
||||
DTF_Message_Lip_Move,
|
||||
DTF_Message_Photinus,
|
||||
DTF_Message_Stack_Time,
|
||||
DTF_Message_Face_Too_More,
|
||||
DTF_Message_Target_Too_Far,
|
||||
DTF_Message_Target_Too_Close,
|
||||
DTF_Message_Calibrate_Too_Far,
|
||||
DTF_Message_Calibrate_Too_Close,
|
||||
DTF_Message_NearFar_Collect,
|
||||
DTF_Message_Face_Not_In_Postion,
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSInteger, DTFLivenessActionGuideType) {
|
||||
DTF_Liveness_Action_Guide_None = -1,//无
|
||||
DTF_Liveness_Action_Guide_BlinkOpenness = 0,//眨眼
|
||||
DTF_Liveness_Action_Guide_LeftYAW,//左摇头
|
||||
DTF_Liveness_Action_Guide_RightYAW,//右摇头
|
||||
DTF_Liveness_Action_Guide_MouthOpen,//张嘴
|
||||
DTF_Liveness_Action_Guide_LipMove,//移动嘴唇
|
||||
DTF_Liveness_Action_Guide_Photinus,//炫彩
|
||||
DTF_Liveness_Action_Guide_NearFar//远近活体
|
||||
};
|
||||
|
||||
@protocol DTFFaceViewProtocol;
|
||||
|
||||
@protocol DTFFaceViewDelegate <NSObject>
|
||||
|
||||
- (void)viewExit:(id<DTFFaceViewProtocol>)view;
|
||||
|
||||
- (void)playBtn:(UIButton *)btn;
|
||||
|
||||
- (void)headRegionChanged:(NSDictionary *)region;//头像区域发生改变
|
||||
|
||||
@end
|
||||
|
||||
@protocol DTFFaceViewProtocol <NSObject>
|
||||
|
||||
@property(nonatomic, weak) id<DTFFaceViewDelegate> delegate;
|
||||
|
||||
- (void)setPreviewLayer:(AVCaptureVideoPreviewLayer *)previewLayer;
|
||||
|
||||
- (void)setScreenRotation:(BOOL)isRotation;
|
||||
|
||||
- (void)setPlayBtnIcon;
|
||||
|
||||
- (void)faceDectectComplete;
|
||||
|
||||
- (void)handleFaceStateChange:(DTFFaceStateMessage)state
|
||||
stateTips:(NSString *)tips
|
||||
actionGuide:(NSString *)guide
|
||||
actionGuideType:(DTFLivenessActionGuideType)guideType
|
||||
progress:(CGFloat)progress
|
||||
extInfo:(NSDictionary *)extInfo;
|
||||
|
||||
- (UIView *)view;
|
||||
|
||||
@optional
|
||||
|
||||
/**
|
||||
* color 炫彩时,设置View的背景色
|
||||
*/
|
||||
- (void)setPhotinusColor:(UIColor *)color;
|
||||
|
||||
/**
|
||||
* 设置是否开启适老化
|
||||
*/
|
||||
- (void)setSuitableType:(BOOL)isSuitable;
|
||||
/**
|
||||
* image 模糊化的人脸图,用于做结束时loading
|
||||
*/
|
||||
- (void)showBlurImage:(UIImage *)image;
|
||||
|
||||
- (void)reset;
|
||||
|
||||
@end
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// DTFNearFarFaceView.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by mengbingchuan on 2024/9/4.
|
||||
// Copyright © 2024 Alipay. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "DTFFaceViewProtocol.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface DTFNearFarFaceView : UIView<DTFFaceViewProtocol>
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame cameraPreviewSize:(CGSize)cameraPreviewSize;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
//
|
||||
// DTFOCRViewProtocol.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by jiangzhipeng on 2025/1/3.
|
||||
// Copyright © 2025 Alipay. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#import "DTFUICustom.h"
|
||||
|
||||
|
||||
//当前认证进度
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class DTFOCRVerifyResultDetailModel;
|
||||
@protocol DTFOCRViewProtocol;
|
||||
|
||||
@protocol DTFOCRViewDelegate <NSObject>
|
||||
|
||||
@required
|
||||
/// 进入拍照,准备拍照环境,开启session,handler回调会返回session的预览图层
|
||||
/// - Parameters:
|
||||
/// - ocrView: 调用view
|
||||
/// - handler: 回调
|
||||
- (void)ocrView:(UIView *)ocrView prepareCaptureWithHandler:(void(^)(AVCaptureVideoPreviewLayer *previewLayer))handler;
|
||||
|
||||
/// 退出拍摄
|
||||
/// - Parameter ocrView: 调用View
|
||||
- (void)ocrViewStopCapture:(UIView *)ocrView;
|
||||
|
||||
/// 拍照
|
||||
/// - Parameters:
|
||||
/// - ocrView: 调用view
|
||||
/// - handler: 回调
|
||||
- (void)ocrView:(UIView *)ocrView captureWithHandler:(void(^)(BOOL success, NSData *imageData))handler;
|
||||
|
||||
/// 选中采集到的照片进行OCR认证,info为认证结果
|
||||
/// - Parameters:
|
||||
/// - ocrView: 调用view
|
||||
/// - isFront: 是否是正面认证
|
||||
/// - rect: 裁剪区域
|
||||
/// - handler: 回调。errorType:错误类型;errorMsg:错误信息,result:认证结果;captureImage:裁剪后的图片
|
||||
- (void)ocrView:(UIView *)ocrView isFront:(BOOL)isFront cropRect:(CGRect)rect confirmImageWithHandler:(void(^)(NSString *verifyCode, DTFOCRVerifyResultDetailModel *result, UIImage *captureImage))handler;
|
||||
|
||||
/// - Parameters:
|
||||
/// - ocrView: 调用view
|
||||
/// - isFront: 是否是正面认证
|
||||
/// - imageData:选择的图片
|
||||
/// - handler: 回调。errorType:错误类型;errorMsg:错误信息,result:认证结果;captureImage:裁剪后的图片
|
||||
- (void)ocrView:(UIView *)ocrView isFront:(BOOL)isFront data:(NSData*)imageData confirmImageWithHandler:(void (^)(NSString * , DTFOCRVerifyResultDetailModel * , UIImage * ))handler;
|
||||
|
||||
/// 切换闪光灯状态,回调为当前状态
|
||||
/// - Parameters:
|
||||
/// - ocrView: 调用View
|
||||
/// - handler: 回调。newMode:闪光灯新状态
|
||||
- (void)ocrView:(UIView *)ocrView switchFlashModeWithHandler:(void(^)(AVCaptureFlashMode newMode))handler;
|
||||
|
||||
/// 获取当前闪光灯状态,返回值:开关状态
|
||||
/// - Parameter ocrView: 调用view
|
||||
- (AVCaptureFlashMode)ocrViewCurrentFlashMode:(UIView *)ocrView;
|
||||
|
||||
/// 同步验证信息,用户可以修改身份证认证信息,返回值error:如果有错误,那么表示认证不通过
|
||||
/// - Parameters:
|
||||
/// - ocrView: 调用view
|
||||
/// - name: 修改后的名字
|
||||
/// - cerNO: 修改后的身份证号码
|
||||
- (NSError *)ocrView:(UIView *)ocrView updateVerifyName:(NSString *)name cerNO:(NSString *)cerNO;
|
||||
|
||||
/// 结束认证
|
||||
/// - Parameters:
|
||||
/// - ocrView: 调用view
|
||||
/// - isComplete: 是否完成,如手动退出则传NO
|
||||
- (void)ocrView:(UIView *)ocrView verifyComplete:(BOOL)isComplete;
|
||||
|
||||
@end
|
||||
|
||||
@protocol DTFOCRViewProtocol <NSObject>
|
||||
|
||||
//delegate对象,这里在sdk内部会引用特定工具类
|
||||
@property (nonatomic, weak) id<DTFOCRViewDelegate>delegate;
|
||||
//弹窗管理对象
|
||||
@property (nonatomic, strong) id<DTFUICustomProtocol> customProtocol;
|
||||
|
||||
@required
|
||||
//返回提供给sdk的view对象
|
||||
- (UIView *)view;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// DTFTextLayer.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by 王伟伟 on 2017/12/5.
|
||||
// Copyright © 2017年 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
#import <CoreGraphics/CoreGraphics.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface DTFTextLayer : CATextLayer
|
||||
|
||||
@property (nonatomic, copy) NSAttributedString *attrStr;
|
||||
|
||||
- (CGSize)stringSize;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// DTFUICustom.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by 汪澌哲 on 2024/1/10.
|
||||
// Copyright © 2024 Alipay. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "DTFUICustomProtocol.h"
|
||||
#import "DTFCustomAlertView.h"
|
||||
#import "DTFColorModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@interface DTFUICustom : NSObject<DTFUICustomProtocol>
|
||||
|
||||
@property (nonatomic, strong) id userCustomProtocol;
|
||||
@property (nonatomic, weak) UIViewController *currentViewController;
|
||||
|
||||
- (void)showAlertViewWithTitle:(NSString *)title msg:(NSString *)msg type:(NSString *)type bizCode:(NSString *)bizCode actions:(NSArray <DTFCustomAlertAction *>*)actions;
|
||||
|
||||
- (BOOL)showPermissionViewWithPermission:(NSArray *)permission serviceType:(DTFServiceType)serviceType;
|
||||
//获取alert参数,这里单独提出来是为了给子类复用
|
||||
- (DTFColorModel *)getAlertParamColorWithType:(NSString *)type bizCode:(NSString *)bizCode;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// DTFUICustomProtocol.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by mengbingchuan on 2022/8/29.
|
||||
// Copyright © 2022 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIkit.h>
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#import "DTFCustomAlertView.h"
|
||||
typedef NS_ENUM(NSInteger, DTFServiceType) {
|
||||
FACE,
|
||||
OCR,
|
||||
WISH
|
||||
};
|
||||
typedef NSString * DTFPermission NS_EXTENSIBLE_STRING_ENUM;
|
||||
|
||||
extern DTFPermission const DTFPermissionTypeVideo;
|
||||
extern DTFPermission const DTFPermissionTypeAudio;
|
||||
extern DTFPermission const DTFPermissionTypeReplay;
|
||||
extern DTFPermission const DTFPermissionTypeAlbum;
|
||||
|
||||
@protocol DTFUICustomProtocol <NSObject>
|
||||
@optional
|
||||
|
||||
/**
|
||||
* Show Permission
|
||||
*/
|
||||
- (BOOL)showPermissionViewWithPermission:(NSArray *)permission serviceType:(DTFServiceType)serviceType;
|
||||
|
||||
@end
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// DTFUIElementManager.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by richard on 08/08/2017.
|
||||
// Copyright © 2017 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
|
||||
@interface DTFUIElementManager : NSObject
|
||||
|
||||
+ (UIView *)generateUIViewWithFrame:(CGRect)frame andBackGroundColor:(UIColor *)backGroundColor andAlpha:(float)alpha;
|
||||
|
||||
+ (UILabel *)generateUIlabelWithFrame:(CGRect)frame andColor:(UIColor *)color andFont:(UIFont*)font andAlpha:(float)alpha andBackGroundColor:(UIColor *)backGroundColor andLineBreakMode:(NSLineBreakMode)breakMode andAlignment:(NSTextAlignment) alignment;
|
||||
|
||||
+ (UIImageView *)generateUIImageViewWithFrame:(CGRect)frame andImageName:(NSString *)imageName andContentMode:(UIViewContentMode)contentMode;
|
||||
|
||||
+ (UIImage *)generateUIImageWithName:(NSString *)imageName;
|
||||
|
||||
@end
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// APFUploadWaveView.h
|
||||
// selfieFaceInfo
|
||||
//
|
||||
// Created by 晗羽 on 11/3/16.
|
||||
// Copyright © 2016 com.antworshop7. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
|
||||
@interface DTFUploadWaveLayer : CALayer
|
||||
|
||||
- (void)setMaskImage:(UIImage *)image;
|
||||
- (void)startWave;
|
||||
- (void)stopWave;
|
||||
|
||||
@end
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// FaceViewProviderProtocol.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by mengbingchuan on 2022/8/29.
|
||||
// Copyright © 2022 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "DTFFaceViewProtocol.h"
|
||||
#import "DTFOCRViewProtocol.h"
|
||||
|
||||
@protocol DTFViewProviderProtocol <NSObject>
|
||||
|
||||
- (id<DTFFaceViewProtocol>)viewForFace;
|
||||
//遵守该协议的对象必须要实现方法,方法返回一个遵守DTFOCRViewProtocol协议的id类型。返回对象可以理解为一个view的提供者
|
||||
- (id<DTFOCRViewProtocol>)viewForOCR;
|
||||
|
||||
@end
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
//
|
||||
// IBioAuthFactor.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by yukun.tyk on 11/9/15.
|
||||
// Copyright © 2015 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
@protocol IBioAuthTask;
|
||||
@class APBRequest, APBResponse;
|
||||
|
||||
|
||||
/**
|
||||
* globalConfig key
|
||||
* 全局超时,值为CGFloat,若设定了该值,则框架可以在相应时间到达后,将全局超时事件封装成APBEvent dispatch给当时运行的task
|
||||
* 即使设定了全局超时,全局计时器默认关闭,需要task在globalInfo中将kGlobalTimerSwitchKey开关设置为YES后才开始计时
|
||||
*/
|
||||
extern NSString *const kGlobalTimeoutKey;
|
||||
|
||||
/**
|
||||
* 远程生物认证因子接口
|
||||
*/
|
||||
@protocol IBioAuthFactor <NSObject>
|
||||
|
||||
/**
|
||||
* 生物认证因子名称,框架根据该名称反射调用到具体生物认证因子
|
||||
*/
|
||||
@property(nonatomic, copy, readonly)NSString *factorName;
|
||||
|
||||
/**
|
||||
* 框架调用该方法来实例化认证因子
|
||||
*
|
||||
* @param request 调用方的认证请求
|
||||
*/
|
||||
- (instancetype)initWithRequest:(APBRequest *)request;
|
||||
|
||||
/**
|
||||
* 获取远程生物认证task队列
|
||||
*/
|
||||
- (NSArray<id<IBioAuthTask>> *)getTasks;
|
||||
|
||||
/**
|
||||
* 获取生物验证全局配置(全局超时等)
|
||||
*/
|
||||
- (NSMutableDictionary *)getGlobalConfig;
|
||||
|
||||
/**
|
||||
* 框架最终返回response之前,由相应认证因子最终处理repsonse
|
||||
*/
|
||||
- (void)finalizeResponse:(APBResponse *)response;
|
||||
|
||||
/**
|
||||
* sdk版本号
|
||||
*/
|
||||
+ (NSString *)getVersion;
|
||||
|
||||
@optional
|
||||
/**
|
||||
* 重启之前调用
|
||||
*/
|
||||
- (void)onEngineWillRestart:(NSMutableDictionary *)pipeInfo;
|
||||
|
||||
/**
|
||||
* 获取生物认证产品元数据
|
||||
*/
|
||||
+ (NSDictionary *)getMetaInfo;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,73 @@
|
||||
//
|
||||
// IBioAuthTask.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by yukun.tyk on 11/4/15.
|
||||
// Copyright © 2015 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <BioAuthEngine/APBBackwardCommand.h>
|
||||
#import <BioAuthEngine/APBEvent.h>
|
||||
#import <BioAuthEngine/APBAuthEngine.h>
|
||||
#import <BioAuthEngine/APBTaskContext.h>
|
||||
|
||||
@class APBTaskContext;
|
||||
@protocol IBioAuthTask;
|
||||
|
||||
/**
|
||||
* pipeInfo key
|
||||
* value为commandBlock,task可以调用并要求框架执行相应APBBackwardCommand命令
|
||||
*/
|
||||
extern NSString *const kTaskCommandBlockKey;
|
||||
|
||||
/**
|
||||
* taskConfig key
|
||||
* task超时,value为CGFloat,如果task设置了该值,框架将开始task计时器,并在时间到达后,将task超时封装成APBEvent发送给当前task
|
||||
*/
|
||||
extern NSString *const kTaskTimeoutKey;
|
||||
|
||||
typedef void (^commandBlock)(APBBackwardCommand *command);
|
||||
|
||||
@protocol BioAuthTaskDelegate <NSObject>
|
||||
|
||||
- (void)task:(id<IBioAuthTask>)task stateChanged:(APBTaskState)state;
|
||||
|
||||
@end
|
||||
|
||||
@protocol IBioAuthTask <NSObject>
|
||||
|
||||
@property(nonatomic, copy, readonly) NSString *taskName; //任务名称
|
||||
@property(nonatomic, strong, readonly) APBTaskContext *context; //任务上下文
|
||||
@property(nonatomic, weak) id<BioAuthTaskDelegate> delegate;
|
||||
|
||||
/**
|
||||
* 开始执行任务队列
|
||||
*/
|
||||
- (void)invokeWithPipeInfo:(NSMutableDictionary *)pipeInfo;
|
||||
|
||||
/**
|
||||
* 处理中断事件
|
||||
*
|
||||
* @param event 事件
|
||||
* @param callback 事件处理结果回调
|
||||
*/
|
||||
- (void)processEvent:(APBEvent *)event
|
||||
withCompletionCallback:(BioAuthExecCallback)callback;
|
||||
|
||||
/**
|
||||
* 获取任务配置(超时等)
|
||||
*/
|
||||
- (NSDictionary *)getConfig;
|
||||
|
||||
/**
|
||||
* 重置任务
|
||||
*/
|
||||
- (void)reset;
|
||||
|
||||
/**
|
||||
* 获取当前管道信息,框架负责传递给下一个task
|
||||
*/
|
||||
- (NSMutableDictionary *)pipeInfo;
|
||||
|
||||
@end
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// NSTimer+bioAuth.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by 王伟伟 on 2017/8/23.
|
||||
// Copyright © 2017年 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface NSTimer (bioAuth)
|
||||
|
||||
@property(nonatomic, strong)NSNumber *remained;
|
||||
@property(nonatomic, strong)NSNumber *paused;
|
||||
|
||||
- (void)pause;
|
||||
- (void)resume;
|
||||
|
||||
@end
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// UIImage+bioAuth.h
|
||||
// BioAuthEngine
|
||||
//
|
||||
// Created by 王伟伟 on 2017/8/23.
|
||||
// Copyright © 2017年 DTF. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <CoreMedia/CoreMedia.h>
|
||||
|
||||
@interface UIImage (bioAuth)
|
||||
|
||||
+ (nullable UIImage *)bioAuth_imageWithColor:(UIColor *_Nullable)color size:(CGSize)size;
|
||||
|
||||
#pragma mark - Resize -
|
||||
- (nullable UIImage *)bioAuth_SubRect:(CGRect)r;
|
||||
- (nullable UIImage *)bioAuth_GaussiamBlur;
|
||||
+ (nullable UIImage *)bioAuth_imageWithCVPixelBuffer:(CVPixelBufferRef _Nullable )buffer;
|
||||
+ (nullable UIImage *)bioAuth_imageWithCMSampleBuffer:(CMSampleBufferRef _Nullable )samplebuffer;
|
||||
- (nullable UIImage *)bioAuth_imageByResizeToSize:(CGSize)size contentMode:(UIViewContentMode)contentMode;
|
||||
@end
|
||||
Binary file not shown.
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSPrivacyCollectedDataTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>NSPrivacyCollectedDataType</key>
|
||||
<string></string>
|
||||
<key>NSPrivacyCollectedDataTypeLinked</key>
|
||||
<false/>
|
||||
<key>NSPrivacyCollectedDataTypeTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyCollectedDataTypePurposes</key>
|
||||
<array>
|
||||
<string></string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>NSPrivacyTrackingDomains</key>
|
||||
<array/>
|
||||
<key>NSPrivacyTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyAccessedAPITypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||
<array>
|
||||
<string>CA92.1</string>
|
||||
</array>
|
||||
<key>NSPrivacyAccessedAPIType</key>
|
||||
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
Reference in new issue
Block a user