diff --git a/DXCaptcha.bundle/dx-captcha-1.0.0.html b/DXCaptcha.bundle/dx-captcha-1.0.0.html new file mode 100644 index 0000000..23d1cf2 --- /dev/null +++ b/DXCaptcha.bundle/dx-captcha-1.0.0.html @@ -0,0 +1,104 @@ + + + + + + + + + + + + +
+
+
+
+
+
+
+
+
+ + + +
+ + + + diff --git a/DXCaptchaSDK-1.7.0.zip b/DXCaptchaSDK-1.7.0.zip deleted file mode 100644 index b7d7d25..0000000 Binary files a/DXCaptchaSDK-1.7.0.zip and /dev/null differ diff --git a/DXCaptchaSDK.podspec b/DXCaptchaSDK.podspec index 649bc78..d149300 100644 --- a/DXCaptchaSDK.podspec +++ b/DXCaptchaSDK.podspec @@ -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" => "marketing@dingxiang-inc.com" } - 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' diff --git a/DingxiangCaptchaSDK.framework/DingxiangCaptchaSDK b/DingxiangCaptchaSDK.framework/DingxiangCaptchaSDK new file mode 100755 index 0000000..4447683 Binary files /dev/null and b/DingxiangCaptchaSDK.framework/DingxiangCaptchaSDK differ diff --git a/DingxiangCaptchaSDK.framework/Headers/DXCaptchaDelegate.h b/DingxiangCaptchaSDK.framework/Headers/DXCaptchaDelegate.h new file mode 100644 index 0000000..4c7f9b2 --- /dev/null +++ b/DingxiangCaptchaSDK.framework/Headers/DXCaptchaDelegate.h @@ -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 + +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 + +@required +- (void) captchaView:(DXCaptchaView *)view didReceiveEvent:(DXCaptchaEventType)eventType arg:(NSDictionary *)dict; + +@end diff --git a/DingxiangCaptchaSDK.framework/Headers/DXCaptchaView.h b/DingxiangCaptchaSDK.framework/Headers/DXCaptchaView.h new file mode 100644 index 0000000..3890e0c --- /dev/null +++ b/DingxiangCaptchaSDK.framework/Headers/DXCaptchaView.h @@ -0,0 +1,22 @@ +// +// DXCaptchaView.h +// DingxiangCaptchaSDK +// +// Created by xelz on 2017/9/25. +// Copyright © 2017年 All rights reserved. +// + +#import +#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)delegate frame:(CGRect)frame; +- (instancetype)initWithAppId:(NSString *)appId delegate:(id)delegate frame:(CGRect)frame; + +@end diff --git a/DingxiangCaptchaSDK.framework/Info.plist b/DingxiangCaptchaSDK.framework/Info.plist new file mode 100644 index 0000000..f8cb1a4 Binary files /dev/null and b/DingxiangCaptchaSDK.framework/Info.plist differ