File tree Expand file tree Collapse file tree 5 files changed +50
-6
lines changed Expand file tree Collapse file tree 5 files changed +50
-6
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
1616 #
1717
1818 s . name = "GYSDK"
19- s . version = "1.3.0 .0"
19+ s . version = "1.4.2 .0"
2020 s . summary = "个验 iOS SDK CocoaPods 集成库"
2121
2222 # This description is used to generate tags and improve search results.
Original file line number Diff line number Diff line change 1+ ; ( function ( ) {
2+ var messagingIframe ,
3+ bridge = 'JSKitOnClient' ,
4+ CUSTOM_PROTOCOL_SCHEME = 'jscall' ;
5+
6+ if ( window [ bridge ] ) { return }
7+
8+ function _createQueueReadyIframe ( doc ) {
9+ messagingIframe = doc . createElement ( 'iframe' ) ;
10+ messagingIframe . style . display = 'none' ;
11+ doc . documentElement . appendChild ( messagingIframe ) ;
12+ }
13+ window [ bridge ] = { } ;
14+ var methods = [ % @] ;
15+ for ( var i = 0 ; i < methods . length ; i ++ ) {
16+ var method = methods [ i ] ;
17+ var code = "(window[bridge])[method] = function " + method + "() {messagingIframe.src = CUSTOM_PROTOCOL_SCHEME + ':' + arguments.callee.name + ':' + encodeURIComponent(JSON.stringify(arguments));}" ;
18+ eval ( code ) ;
19+ }
20+
21+ //创建iframe,必须在创建external之后,否则会出现死循环
22+ _createQueueReadyIframe ( document ) ;
23+ //通知js开始初始化
24+ //initReady();
25+ } ) ( ) ;
26+
Original file line number Diff line number Diff line change 1717 * @param isSuccess 成功标志位
1818 * @param error 错误信息
1919 */
20- typedef void (^GyCallback)(BOOL isSuccess, NSError *error);
20+ typedef void (^GyCallback)(BOOL isSuccess, NSError *error, NSString *gyUid );
2121/* *
2222 * 验证接口回调
2323 *
@@ -33,6 +33,12 @@ typedef void (^GyVerifyCallback)(NSDictionary *verifyDictionary);
3333 */
3434typedef void (^GySmsVerifyCallback)(NSDictionary *smsVerifyDictionary);
3535
36+ /* *
37+ * 准备弹出动画窗口回调,用于智能无感验证失败后,准备弹出动画窗口前的回调处理。
38+ *
39+ */
40+ typedef void (^GyReadyAnimationCallback)(void );
41+
3642
3743/* *
3844 * 验证方式
@@ -111,24 +117,36 @@ typedef NS_ENUM(NSUInteger, GyVerifyType) {
111117 */
112118+ (void )checkLogin : (GyCheckModel *)checkModel withCallback : (GyVerifyCallback)callback ;
113119
120+
114121/* *
115122 智能无感验证接口
116-
123+
117124 @param pnMD5 MD5后的手机号码
118125 @param accountId accountId
119126 @param businessId 业务Id
120127 @param callback 通用接口回调
121128 */
122- + (void )nonSenseCaptchaWithPnMD5 : (NSString *)pnMD5 accountId : (NSString *)accountId businessId : (NSString *)businessId withCallback : (GyVerifyCallback)callback ;
129+ + (void )nonSenseCaptcha : (NSString *)pnMD5 accountId : (NSString *)accountId businessId : (NSString *)businessId isShowLoadingView : ( BOOL ) showLoadingView readyAnimation : (GyReadyAnimationCallback) readyAnimationCallback completeCallback : (GyVerifyCallback)callback ;
123130
124131/* *
125132 动画验证接口
126-
133+
127134 @param businessId 业务Id
128135 @param callback 通用接口回调
129136 */
130137
131- + (void )startAnimationCaptchaWithBusinessId : (NSString *)businessId withCallback : (GyVerifyCallback)callback ;
138+ + (void )startAnimationCaptcha : (NSString *)businessId isShowLoadingView : (BOOL )showLoadingView isReadyAnimation : (GyReadyAnimationCallback)readyAnimationCallback completeCallback : (GyVerifyCallback)callback ;
139+
140+
141+ /* *
142+ 一键登录接口
143+
144+ @param controller 当前视图
145+ @param smsTemplateId 短信模板,配置该字段则可以使用云验证
146+ @param callback 通用接口回调
147+ */
148+ + (void )oneTapLoginController : (UIViewController *)controller smsTemplateId : (NSString *)smsTemplateId withCallback : (GyVerifyCallback)callback ;
149+
132150/* *
133151 * 销毁 SDK
134152 */
You can’t perform that action at this time.
0 commit comments