> >

DeepKnow 说明

DeepKnow 为极验业务安全服务的基础感知构件,主要用于采集客户端的相关安全信息,为后续服务提供数据,是其他极验服务的基础,

如果只需求无感知判断的用户部署此 SDK 即可。

如果需求行为验证服务,部署完成此 SDK 后,还需部署验证UI相关构件,请参考行为验证部署文档

Protocol

DeepKnowDelegate

DeepKnow的代理方法

deepknow:didReceiveChallenge:

获取实时challenge, 需通过全局ID进行初始化后才可以获得该回调

Declaration

- (void)deepknow:(DeepKnow *)deepknow didReceiveChallenge:(NSString *)challenge;

Parameters

Param Description
deepknow DeepKnow实例
challenge 用于结果查询的challenge

deepknowWillFlush:

控制请求是否发送的行为

Declaration

- (BOOL)deepknowWillFlush:(DeepKnow *)deepknow;

Parameters

Param Description
deepknow DeepKnow实例

Return Value

是否发送当前的请求, 默认为YES。

DeepKnow

DeepKnow的外部调用接口及属性

Category

UIViewController(DeepKnow)

dpEventAlias

ViewController别名, 用于给数据增加标签。

@property (nonatomic, strong) NSString *dpEventAlias;

推荐在viewDidLoad时设置,且必须在应用内唯一。

dpDisableTracking

设置当前VC是否被分析。YES 禁止/NO 允许。默认为NO。

@property (nonatomic, assign) BOOL dpDisableTracking;

推荐在viewDidLoad时设置。

Property

delegate

DeepKnow生命周期代理

Declaration

@property (nonatomic, weak) id<DeepKnowDelegate> delegate;

flushInterval

发送间隔, 默认60秒

Declaration

@property (atomic) NSUInteger flushInterval;

flushOnBackground;

是否允许应用进入后台时发送数据, 默认YES

Declaration

@property (atomic) BOOL flushOnBackground;

shouldManageNetworkActivityIndicator;

是否发送显示状态栏上的网络指示器, 默认YES

Declaration

@property (atomic) BOOL shouldManageNetworkActivityIndicator;

Method

sdkVersion

获取sdk版本号

Declaration

+ (NSString *)sdkVersion;

Return

sdk版本号

sharedInstanceWithGTID:

返回指定ID的DeepKnow实例

Declaration

+ (nullable DeepKnow *)sharedInstanceWithGTID:(nonnull NSString *)gt_id;

Return

DeepKnow的实例

sharedInstance

返回最近新建的DeepKnow实例

Declaration

+ (nullable DeepKnow *)sharedInstance;

Return

DeepKnow的实例

start

启动DeepKnow

Declaration

- (void)start;

stop

停止DeepKnow

Declaration

- (void)stop;

emitRecentSenseDataWithGTID:interactive: attribution:completionHandler:

提交最近的行为副本, 并拉取分析结果

Declaration

- (void)emitRecentSenseDataWithGTID:(NSString *)gtID
interactive:(NSUInteger)interactive
attribution:(NSDictionary *)attr
completionHandler:(void(^)( NSDictionary * _Nullable dict, NSError * _Nullable error))completion;

Parameters

Param Description
gtID 场景id(gt_id)
interactive 当前场景类型详见: 1 注册, 2 登录, 3 短信接口, 4 领券\抽奖, 5 下单, 6 发帖评论, 0 其他
attr 额外的场景属性
completion 本次提交对应的回调, 成功时返回包含challenge, 失败时仅返回描述错误的error对象