-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
218 additions
and
1 deletion.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,9 @@ Pod::Spec.new do |s| | |
s.homepage = "https://www.dingxiang-inc.com/docs/detail/captcha#doc-h3-12" | ||
s.license = { :type => "Commercial", :text => "dingxiang-inc"} | ||
s.author = { "CMBSDK" => "[email protected]" } | ||
s.source = { :http => "https://github.com/letspod/DXCaptchaSDK/raw/master/DXCaptchaSDK-1.7.0.zip" } | ||
s.source = { :git => 'https://github.com/letspod/DXCaptchaSDK.git', :tag => s.version.to_s } | ||
s.requires_arc = true | ||
s.frameworks = 'libz','libresolv','libc++','SystemConfiguration','CoreLocation','CoreTelephony' | ||
s.ios.deployment_target = '8.0' | ||
s.vendored_frameworks ='DingxiangCaptchaSDK.framework' | ||
s.resource = 'DXCaptcha.bundle' | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
// | ||
// DXCaptchaDelegate.h | ||
// DingxiangCaptchaSDK | ||
// | ||
// Created by xelz on 2017/9/25. | ||
// Copyright © 2017年 All rights reserved. | ||
// | ||
#define DXCAPTCHA_SDK_VERSION "1.7.0" | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
typedef enum { | ||
DXCaptchaEventNone, | ||
|
||
// 渲染事件,验证码开始渲染时触发 | ||
DXCaptchaEventBeforeRender, | ||
DXCaptchaEventRender, | ||
DXCaptchaEventAfterRender, | ||
|
||
// 验证码准备就绪,可以接受用户输入时触发 | ||
DXCaptchaEventBeforeReady, | ||
DXCaptchaEventReady, | ||
DXCaptchaEventAfterReady, | ||
|
||
// 加载失败时触发 | ||
DXCaptchaEventBeforeLoadFail, | ||
DXCaptchaEventLoadFail, | ||
DXCaptchaEventAfterLoadFail, | ||
|
||
// 用户开始拖动滑块 | ||
DXCaptchaEventBeforeDragStart, | ||
DXCaptchaEventDragStart, | ||
DXCaptchaEventAfterDragStart, | ||
|
||
// 用户拖动滑块过程中多次触发 | ||
DXCaptchaEventBeforeDragging, | ||
DXCaptchaEventDragging, | ||
DXCaptchaEventAfterDragging, | ||
|
||
// 用户释放滑块,结束拖动 | ||
DXCaptchaEventBeforeDragEnd, | ||
DXCaptchaEventDragEnd, | ||
DXCaptchaEventAfterDragEnd, | ||
|
||
// 向校验接口提交数据进行校验 | ||
DXCaptchaEventBeforeVerify, | ||
DXCaptchaEventVerify, | ||
DXCaptchaEventAfterVerify, | ||
|
||
// 校验接口已返回数据 | ||
DXCaptchaEventBeforeVerifyDone, | ||
DXCaptchaEventVerifyDone, | ||
DXCaptchaEventAfterVerifyDone, | ||
|
||
// 校验接口已返回数据,且结果为成功 | ||
DXCaptchaEventBeforeVerifySuccess, | ||
DXCaptchaEventVerifySuccess, | ||
DXCaptchaEventAfterVerifySuccess, | ||
|
||
// 校验接口已返回数据,且结果为失败 | ||
DXCaptchaEventBeforeVerifyFail, | ||
DXCaptchaEventVerifyFail, | ||
DXCaptchaEventAfterVerifyFail, | ||
|
||
// 无感验证通过 | ||
DXCaptchaEventBeforePassByServer, | ||
DXCaptchaEventPassByServer, | ||
DXCaptchaEventAfterPassByServer, | ||
|
||
// 验证通过,无论是滑动验证通过还是无感验证通过均会触发 | ||
DXCaptchaEventSuccess, | ||
|
||
// 验证失败 | ||
DXCaptchaEventFail, | ||
|
||
//点击logo | ||
DXCaptchaEventTapLogo, | ||
|
||
//加载太多次 | ||
DXCaptchaEventLoadTooMuch | ||
} DXCaptchaEventType; | ||
|
||
@class DXCaptchaView; | ||
|
||
@protocol DXCaptchaDelegate <NSObject> | ||
|
||
@required | ||
- (void) captchaView:(DXCaptchaView *)view didReceiveEvent:(DXCaptchaEventType)eventType arg:(NSDictionary *)dict; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// DXCaptchaView.h | ||
// DingxiangCaptchaSDK | ||
// | ||
// Created by xelz on 2017/9/25. | ||
// Copyright © 2017年 All rights reserved. | ||
// | ||
|
||
#import <WebKit/WebKit.h> | ||
#import "DXCaptchaDelegate.h" | ||
|
||
@interface DXCaptchaView : WKWebView | ||
|
||
- (instancetype)init NS_UNAVAILABLE; | ||
+ (instancetype)new NS_UNAVAILABLE; | ||
- (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE; | ||
- (instancetype)initWithFrame:(CGRect)frame configuration:(WKWebViewConfiguration *)configuration NS_UNAVAILABLE; | ||
|
||
- (instancetype)initWithConfig:(NSDictionary *)config delegate:(id<DXCaptchaDelegate>)delegate frame:(CGRect)frame; | ||
- (instancetype)initWithAppId:(NSString *)appId delegate:(id<DXCaptchaDelegate>)delegate frame:(CGRect)frame; | ||
|
||
@end |
Binary file not shown.