diff --git "a/API\350\257\246\347\273\206\350\257\264\346\230\216.md" "b/API\350\257\246\347\273\206\350\257\264\346\230\216.md" index 036bb07..b48cdba 100644 --- "a/API\350\257\246\347\273\206\350\257\264\346\230\216.md" +++ "b/API\350\257\246\347\273\206\350\257\264\346\230\216.md" @@ -403,8 +403,9 @@ const customConfigParams = { privacyOne: ['隐私条款一', 'https://www.jiguang.cn/about'], //隐私条款一(显示名称和url,请严格按照格式) privacyTwo: ['隐私条款二', 'https://www.jiguang.cn/about'], //隐私条款二(显示名称和url,请严格按照格式) + privacyNameAndUrlBeanList: [{'name':'隐私条款一','url':'https://www.jiguang.cn/about','beforeName':'、','afterName':'、'}, {'name':'隐私条款一','url':'https://www.jiguang.cn/about','beforeName':'、', 'afterName':'、'}], privacyColor: [-16777216, -65536], //隐私条款颜色 (显示名称和url的颜色,请严格按照格式) - privacyText: ['登录即同意', '和', '、', '并使用本机号码登录'], //隐私条款名称外的文字 + privacyText: ['登录即同意', '并使用本机号码登录'], //隐私条款名称外的文字 privacyTextSize: 15, //隐私条款文字字体大小 privacyTextGravityMode: 'left', //隐私条款文本对齐方式,目前仅支持 left、center privacyBookSymbolEnable: false, //隐私条款是否显示书名号,默认不显示 diff --git a/CHANGELOG.md b/CHANGELOG.md index 195293d..01f76f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ - +### v 2.4.9 +- 更新SDK版本 iOS更新至认证SDK2.7.5 Android更新至认证SDK2.7.4。 ### v 2.4.7 - 修复android偶现的崩溃问题。 ### v 2.4.6 diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..f6b961f Binary files /dev/null and b/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..b9d4362 --- /dev/null +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Mon Sep 06 16:22:36 CST 2021 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip diff --git a/android/libs/arm64-v8a/libCtaApiLib.so b/android/libs/arm64-v8a/libCtaApiLib.so index 04d5a4b..c490132 100644 Binary files a/android/libs/arm64-v8a/libCtaApiLib.so and b/android/libs/arm64-v8a/libCtaApiLib.so differ diff --git a/android/libs/armeabi-v7a/libCtaApiLib.so b/android/libs/armeabi-v7a/libCtaApiLib.so index 5e0d7ac..5e1e0be 100644 Binary files a/android/libs/armeabi-v7a/libCtaApiLib.so and b/android/libs/armeabi-v7a/libCtaApiLib.so differ diff --git a/android/libs/armeabi/libCtaApiLib.so b/android/libs/armeabi/libCtaApiLib.so index 5d5e488..0018d68 100644 Binary files a/android/libs/armeabi/libCtaApiLib.so and b/android/libs/armeabi/libCtaApiLib.so differ diff --git a/android/libs/jverification-android-not_support_dynamic-release-2.6.7.jar b/android/libs/jverification-android-not_support_dynamic-release-2.6.7.jar deleted file mode 100644 index 890bb93..0000000 Binary files a/android/libs/jverification-android-not_support_dynamic-release-2.6.7.jar and /dev/null differ diff --git a/android/libs/jverification-android-not_support_dynamic-release-2.7.4.jar b/android/libs/jverification-android-not_support_dynamic-release-2.7.4.jar new file mode 100644 index 0000000..5fa1d92 Binary files /dev/null and b/android/libs/jverification-android-not_support_dynamic-release-2.7.4.jar differ diff --git a/android/libs/x86/libCtaApiLib.so b/android/libs/x86/libCtaApiLib.so index 312cf68..a311387 100644 Binary files a/android/libs/x86/libCtaApiLib.so and b/android/libs/x86/libCtaApiLib.so differ diff --git a/android/libs/x86_64/libCtaApiLib.so b/android/libs/x86_64/libCtaApiLib.so index ed09ee9..426c7fd 100644 Binary files a/android/libs/x86_64/libCtaApiLib.so and b/android/libs/x86_64/libCtaApiLib.so differ diff --git a/android/src/main/java/cn/jiguang/plugins/verification/JVerificationModule.java b/android/src/main/java/cn/jiguang/plugins/verification/JVerificationModule.java index a8a4a87..a554100 100644 --- a/android/src/main/java/cn/jiguang/plugins/verification/JVerificationModule.java +++ b/android/src/main/java/cn/jiguang/plugins/verification/JVerificationModule.java @@ -19,7 +19,11 @@ import com.facebook.react.bridge.WritableMap; import com.facebook.react.modules.core.DeviceEventManagerModule; +import org.json.JSONObject; + import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.List; import cn.jiguang.plugins.verification.common.JConstans; import cn.jiguang.plugins.verification.common.JLogger; @@ -27,6 +31,7 @@ import cn.jiguang.verifysdk.api.JVerificationInterface; import cn.jiguang.verifysdk.api.JVerifyUIConfig; import cn.jiguang.verifysdk.api.PreLoginListener; +import cn.jiguang.verifysdk.api.PrivacyBean; import cn.jiguang.verifysdk.api.RequestCallback; import cn.jiguang.verifysdk.api.VerifyListener; @@ -363,21 +368,38 @@ private void convertToConfig(ReadableMap readableMap){ builder.setLogBtnHeight(dp2Pix(readableMap.getInt(JConstans.LOGIN_BTN_H))); } //协议 - if(readableMap.hasKey(JConstans.PRIVACY_ONE)){ + if(readableMap.hasKey(JConstans.PRIVACY_ONE)){//过期 2.7.3+不生效 ReadableArray array = readableMap.getArray(JConstans.PRIVACY_ONE); builder.setAppPrivacyOne(array.getString(0),array.getString(1)); } - if(readableMap.hasKey(JConstans.PRIVACY_TWO)){ + if(readableMap.hasKey(JConstans.PRIVACY_TWO)){//过期 2.7.3+不生效 ReadableArray array = readableMap.getArray(JConstans.PRIVACY_TWO); builder.setAppPrivacyTwo(array.getString(0),array.getString(1)); } + if (readableMap.hasKey(JConstans.PRIVACY_NAME_AND_URL_BEANLIST)) {// since 273 + ReadableArray jsonArray = readableMap.getArray(JConstans.PRIVACY_NAME_AND_URL_BEANLIST); + if(jsonArray!=null&&jsonArray.size()!=0){ + List beanArrayList = new ArrayList<>(); + + for (int i=0;i +#import + +static NSString * const EAccountJSEventName = @"EAccountJsBridge"; + +NS_ASSUME_NONNULL_BEGIN + +@protocol EAccountJSEventDelegate + +@required +- (void)EAccountJSCallBackWithScript:(NSString *)jScript; + +@end + +@interface EAccountJSEventHandler : NSObject + +@property (nonatomic, strong) WKWebView *wkWebView; +@property (nonatomic, weak) id delegate; + +- (void)EAccountHandleJsEvents:(WKScriptMessage *)message credt:(id)credt; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/RCTJVerificationModule/EAccountApiSDK.framework/Headers/EAccountPreLoginConfigModel.h b/ios/RCTJVerificationModule/EAccountApiSDK.framework/Headers/EAccountPreLoginConfigModel.h index 47328d7..793a7ad 100644 --- a/ios/RCTJVerificationModule/EAccountApiSDK.framework/Headers/EAccountPreLoginConfigModel.h +++ b/ios/RCTJVerificationModule/EAccountApiSDK.framework/Headers/EAccountPreLoginConfigModel.h @@ -13,24 +13,19 @@ NS_ASSUME_NONNULL_BEGIN @interface EAccountPreLoginConfigModel : NSObject /** - NSURLRequest的最大空闲时间 默认3s - */ -@property (nonatomic, assign) NSTimeInterval timeoutIntervalForRequest; - -/** - NSURLSession资源获取超时时间 默认3s + 资源获取超时时间 默认6.0s */ @property (nonatomic, assign) NSTimeInterval timeoutIntervalForResource; /** - socket连接超时时间 默认3s + 连接超时时间 默认6.0s */ -@property (nonatomic, assign) NSTimeInterval socketConnectTimeoutInterval; +@property (nonatomic, assign) NSTimeInterval connectTimeoutInterval; /** - socket请求总超时时间 默认6s 建议设置比 socket连接超时时间 长 - */ -@property (nonatomic, assign) NSTimeInterval socketTotalTimeoutInterval; + 总超时时间 默认8.0s ,应设置比其他超时时间长 +*/ +@property (nonatomic, assign) NSTimeInterval totalTimeoutInterval; #pragma -mark 初始化方法 diff --git a/ios/RCTJVerificationModule/EAccountApiSDK.framework/Headers/EAccountSDK.h b/ios/RCTJVerificationModule/EAccountApiSDK.framework/Headers/EAccountSDK.h old mode 100755 new mode 100644 index b0c09c7..421e24b --- a/ios/RCTJVerificationModule/EAccountApiSDK.framework/Headers/EAccountSDK.h +++ b/ios/RCTJVerificationModule/EAccountApiSDK.framework/Headers/EAccountSDK.h @@ -7,7 +7,7 @@ // /** - 定制版SDK v3.7.2 20191217 + 定制版SDK v3.8.5 20201030 */ #import @@ -18,7 +18,7 @@ 声明一个block @param resultDic 网络返回的data的解析结果 */ -typedef void (^successHandler) ( NSDictionary * _Nonnull resultDic); +typedef void (^successHandler) (NSDictionary * _Nonnull resultDic); /** 声明一个block @@ -36,14 +36,6 @@ typedef void (^failureHandler) (NSError * _Nonnull error); + (void)initWithSelfKey:(NSString * _Nonnull)appKey appSecret:(NSString * _Nonnull)appSecrect; - -/** - 默认为正式环境的bundleID,需要使用测试环境的bundleID(企业证书重签名),请添加这个方法,在发布APP的时候请确保没有使用该方法。 - */ - -+(void)setTestBundleId; - - /** *@description 预登录接口 @param model 接口超时时间配置 @@ -54,25 +46,38 @@ typedef void (^failureHandler) (NSError * _Nonnull error); failure:(nonnull failureHandler)fail; /** - *@description 预登录接口 - @param apiTimeoutInterval 接口超时时间,传0或者小于0的数,则默认为3s + 控制台日志输出控制(默认关闭) + @param enable 开关参数 */ ++ (void)printConsoleEnable:(BOOL)enable; -+ (void)requestPreLogin:(NSTimeInterval)apiTimeoutInterval - completion:(nonnull successHandler)completion - failure:(nonnull failureHandler)fail DEPRECATED_MSG_ATTRIBUTE("Please use `requestPRELogin:completion:failure:` instead"); +/** +@description 获取当前流量卡运营商信息 +@return NSString "CT" 中国电信 / "CM" 中国移动 / "CU" 中国联联通 / "UN" 未知 +*/ ++ (NSString *)getOperatorType; +/** +@description 是否开启蜂窝数据 +*/ ++ (BOOL)isCellularDataEnable; /** - *@description 预登录接口 废弃 + @description 预登录接口 已废弃 @param apiTimeoutInterval 接口超时时间,传0或者小于0的数,则默认为3s */ ++ (void)requestPreLogin:(NSTimeInterval)apiTimeoutInterval + completion:(nonnull successHandler)completion + failure:(nonnull failureHandler)fail DEPRECATED_MSG_ATTRIBUTE("Please use `requestPRELogin:completion:failure:` instead"); +/** + @description 预登录接口 已废弃 + @param apiTimeoutInterval 接口超时时间,传0或者小于0的数,则默认为3s + */ + (void)getMobileCodeWithTimeout:(NSTimeInterval)apiTimeoutInterval completion:(nonnull successHandler)completion - failure:(nonnull failureHandler)fail DEPRECATED_MSG_ATTRIBUTE("Please use `requestPreLogin:completion:failure:` instead"); - + failure:(nonnull failureHandler)fail DEPRECATED_MSG_ATTRIBUTE("Please use `requestPreLogin:completion:failure:` instead"); -+ (void)setDomainName:(EAccountCTEConfig *)config; ++ (void)setDomainName:(EAccountCTEConfig * _Nonnull)config; @end diff --git a/ios/RCTJVerificationModule/EAccountApiSDK.framework/Info.plist b/ios/RCTJVerificationModule/EAccountApiSDK.framework/Info.plist old mode 100755 new mode 100644 index f44276a..a0af186 Binary files a/ios/RCTJVerificationModule/EAccountApiSDK.framework/Info.plist and b/ios/RCTJVerificationModule/EAccountApiSDK.framework/Info.plist differ diff --git a/ios/RCTJVerificationModule/ESOneKeyLogin.framework/ESOneKeyLogin b/ios/RCTJVerificationModule/ESOneKeyLogin.framework/ESOneKeyLogin index c122658..49270e6 100644 Binary files a/ios/RCTJVerificationModule/ESOneKeyLogin.framework/ESOneKeyLogin and b/ios/RCTJVerificationModule/ESOneKeyLogin.framework/ESOneKeyLogin differ diff --git a/ios/RCTJVerificationModule/ESOneKeyLogin.framework/Info.plist b/ios/RCTJVerificationModule/ESOneKeyLogin.framework/Info.plist index b79e013..c4898ed 100644 Binary files a/ios/RCTJVerificationModule/ESOneKeyLogin.framework/Info.plist and b/ios/RCTJVerificationModule/ESOneKeyLogin.framework/Info.plist differ diff --git a/ios/RCTJVerificationModule/ESOneKeyLogin.framework/_CodeSignature/CodeDirectory b/ios/RCTJVerificationModule/ESOneKeyLogin.framework/_CodeSignature/CodeDirectory index 7018250..b6988bb 100644 Binary files a/ios/RCTJVerificationModule/ESOneKeyLogin.framework/_CodeSignature/CodeDirectory and b/ios/RCTJVerificationModule/ESOneKeyLogin.framework/_CodeSignature/CodeDirectory differ diff --git a/ios/RCTJVerificationModule/ESOneKeyLogin.framework/_CodeSignature/CodeRequirements-1 b/ios/RCTJVerificationModule/ESOneKeyLogin.framework/_CodeSignature/CodeRequirements-1 index e115c0b..a7554f8 100644 Binary files a/ios/RCTJVerificationModule/ESOneKeyLogin.framework/_CodeSignature/CodeRequirements-1 and b/ios/RCTJVerificationModule/ESOneKeyLogin.framework/_CodeSignature/CodeRequirements-1 differ diff --git a/ios/RCTJVerificationModule/ESOneKeyLogin.framework/_CodeSignature/CodeResources b/ios/RCTJVerificationModule/ESOneKeyLogin.framework/_CodeSignature/CodeResources index 5db8f9d..e731126 100644 --- a/ios/RCTJVerificationModule/ESOneKeyLogin.framework/_CodeSignature/CodeResources +++ b/ios/RCTJVerificationModule/ESOneKeyLogin.framework/_CodeSignature/CodeResources @@ -14,7 +14,7 @@ Info.plist - gQCQkFZw35dqkcBcFazCFGleuqo= + Sv945I3brqpV61ojI1GIvfv/h0I= Modules/module.modulemap diff --git a/ios/RCTJVerificationModule/JVERIFICATIONService.h b/ios/RCTJVerificationModule/JVERIFICATIONService.h index 6b1d9cb..b9e6b78 100644 --- a/ios/RCTJVerificationModule/JVERIFICATIONService.h +++ b/ios/RCTJVerificationModule/JVERIFICATIONService.h @@ -9,7 +9,7 @@ #import #import -#define JVER_VERSION_NUMBER 2.6.7 +#define JVER_VERSION_NUMBER 2.7.5 /** @@ -35,6 +35,14 @@ typedef NS_ENUM(NSUInteger, JVLayoutItem) { JVLayoutItemSuper }; +/** + 设置隐私Label的垂直对齐方式 + */ +typedef NS_ENUM(NSInteger,JVVerAlignment){ + JVVerAlignmentTop = 0,//default + JVVerAlignmentMiddle, + JVVerAlignmentBottom +}; @interface JVLayoutConstraint : NSObject /** @@ -59,7 +67,7 @@ typedef NS_ENUM(NSUInteger, JVLayoutItem) { @param c 常量 @return JVLayoutConstraint布局对象 */ -+(instancetype)constraintWithAttribute:(NSLayoutAttribute)attr1 ++(instancetype _Nullable )constraintWithAttribute:(NSLayoutAttribute)attr1 relatedBy:(NSLayoutRelation)relation toItem:(JVLayoutItem)item attribute:(NSLayoutAttribute)attr2 @@ -194,6 +202,27 @@ typedef NS_ENUM(NSUInteger, JVLayoutItem) { 条款链接, 支持在线文件和NSBundle本地文件, 沙盒中文件仅支持 NSTemporaryDirectory() 路径下文件 */ @property (nonatomic,strong) NSArray *appPrivacyTwo; + +/**隐私条款组合:数组,使用此参数,则默认放弃appPrivacyOne、appPrivacyTwo的效果。 + NSAttributedString *agreementNavtext1 = [[NSAttributedString alloc]initWithString:@"协议1自定义标题" attributes:@{NSForegroundColorAttributeName:[UIColor whiteColor],NSFontAttributeName:[UIFont boldSystemFontOfSize:18]}];; + NSAttributedString *agreementNavtext2 = [[NSAttributedString alloc]initWithString:@"协议2自定义标题" attributes:@{NSForegroundColorAttributeName:[UIColor whiteColor],NSFontAttributeName:[UIFont boldSystemFontOfSize:18]}];; + NSAttributedString *agreementNavtext3 = [[NSAttributedString alloc]initWithString:@"协议3自定义标题" attributes:@{NSForegroundColorAttributeName:[UIColor whiteColor],NSFontAttributeName:[UIFont boldSystemFontOfSize:18]}];; + NSAttributedString *agreementNavtext4 = [[NSAttributedString alloc]initWithString:@"协议4自定义标题" attributes:@{NSForegroundColorAttributeName:[UIColor whiteColor],NSFontAttributeName:[UIFont boldSystemFontOfSize:18]}]; + NSAttributedString *agreementNavtext5 = [[NSAttributedString alloc]initWithString:@"协议5自定义标题" attributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}]; + + //隐私---新方法 存在appPrivacys则默认使用appPrivacys方式 + config.appPrivacys = @[ + @"头部文字",//头部文字 + @[@"、",@"应用自定义服务条款1",@"https://www.taobao.com/",agreementNavtext1], + @[@"、",@"应用自定义服务条款2",@"https://www.jiguang.cn/",agreementNavtext2], + @[@"、",@"应用自定义服务条款3",@"https://www.baidu.com/", agreementNavtext3], + @[@"、",@"应用自定义服务条款4",@"https://www.taobao.com/",agreementNavtext4], + @[@"、",@"应用自定义服务条款5",@"https://www.taobao.com/",agreementNavtext5], + @"尾部文字。" + ]; + */ +@property (nonatomic,strong) NSArray * _Nullable appPrivacys; + /**隐私条款名称颜色 @[基础文字颜色,条款颜色] */ @@ -208,6 +237,8 @@ typedef NS_ENUM(NSUInteger, JVLayoutItem) { @property (nonatomic,assign) CGFloat privacyLineSpacing; /**隐私条款Y偏移量(注:此属性为与屏幕底部的距离)*/ @property (nonatomic,assign) CGFloat privacyOffsetY DEPRECATED_MSG_ATTRIBUTE("Please use privacyConstraints"); +/**是否隐藏导航栏*/ +@property (nonatomic,assign) BOOL privacysNavCustom; /**隐私条款拼接文本数组,数组限制4个NSString对象,否则无效 默认文本1为:”登录即同意“,文本2:”和“,文本3:”、“,文本4:”并使用本机号码登录“ 设置后,隐私协议栏文本修改为 文本1 + 运营商默认协议名称 + 文本2 + 开发者协议名称1 + 文本3 + 开发者协议文本2 + 文本4 @@ -219,6 +250,8 @@ typedef NS_ENUM(NSUInteger, JVLayoutItem) { @property (nonatomic, copy) NSArray * privacyHorizontalConstraints; /**隐私条款check框默认状态 默认:NO */ @property (nonatomic,assign) BOOL privacyState; +/*隐私条约Label的垂直对齐方式*/ +@property (nonatomic,assign) JVVerAlignment textVerAlignment; /* 当自定义Alert view,当隐私条款未选中时,点击登录按钮时回调 当此参数存在时,未选中隐私条款的情况下,登录按钮可以被点击 diff --git a/ios/RCTJVerificationModule/OAuth.framework/Headers/ZOAuthManager.h b/ios/RCTJVerificationModule/OAuth.framework/Headers/ZOAuthManager.h index 7b08738..0e852d0 100644 --- a/ios/RCTJVerificationModule/OAuth.framework/Headers/ZOAuthManager.h +++ b/ios/RCTJVerificationModule/OAuth.framework/Headers/ZOAuthManager.h @@ -8,10 +8,7 @@ #import #import -typedef NS_ENUM(NSUInteger, ServiceType) { - ServiceTypeMobile, - ServiceTypeOAuth, -}; + @interface ZOAuthManager : NSObject /** @@ -19,7 +16,7 @@ typedef NS_ENUM(NSUInteger, ServiceType) { * * @param isDebug true/false */ -+ (void) setDebug:(Boolean) isDebug ; ++ (void) setDebug:(BOOL) isDebug ; /** * 是否使用SHA256 diff --git a/ios/RCTJVerificationModule/OAuth.framework/Headers/ZTOAuthManager.h b/ios/RCTJVerificationModule/OAuth.framework/Headers/ZTOAuthManager.h index 6fc8bdc..9d9e822 100644 --- a/ios/RCTJVerificationModule/OAuth.framework/Headers/ZTOAuthManager.h +++ b/ios/RCTJVerificationModule/OAuth.framework/Headers/ZTOAuthManager.h @@ -36,6 +36,7 @@ /** + 不推荐使用 中断取号登录流程(按需使用) 取消取号请求 */ @@ -71,7 +72,7 @@ -//释放SDK内部单例对象 +//释放SDK内部单例对象 不推荐使用 -(void)ZOAURelease; diff --git a/ios/RCTJVerificationModule/OAuth.framework/Headers/ZUOAuthManager.h b/ios/RCTJVerificationModule/OAuth.framework/Headers/ZUOAuthManager.h index bd94da2..3b9c8ff 100644 --- a/ios/RCTJVerificationModule/OAuth.framework/Headers/ZUOAuthManager.h +++ b/ios/RCTJVerificationModule/OAuth.framework/Headers/ZUOAuthManager.h @@ -27,7 +27,7 @@ /** * 取号-联通 */ -- (void) login:(double)timeout resultListener:(void (^)(NSDictionary *data))listener; +- (void)login:(double)timeout resultListener:(void (^)(NSDictionary *data))listener; /** @@ -37,6 +37,7 @@ /** + 不推荐使用 中断取号登录流程(按需使用) 取消取号请求 */ @@ -73,13 +74,7 @@ - (void) gmbc:(NSString*)accessCode mobile:(NSString *)mobile listener:(void (^)(NSDictionary *data))listener; -/** - * 测试接口 - */ -- (void) gmbc:(NSString*)accessCode listener:(void (^)(NSDictionary *data))listener; - - -//释放SDK内部单例对象 +//释放SDK内部单例对象 不推荐使用 -(void)ZOAURelease; @end diff --git a/ios/RCTJVerificationModule/OAuth.framework/Info.plist b/ios/RCTJVerificationModule/OAuth.framework/Info.plist old mode 100755 new mode 100644 index d1d09b3..d7675f4 Binary files a/ios/RCTJVerificationModule/OAuth.framework/Info.plist and b/ios/RCTJVerificationModule/OAuth.framework/Info.plist differ diff --git a/ios/RCTJVerificationModule/OAuth.framework/OAuth b/ios/RCTJVerificationModule/OAuth.framework/OAuth index 7227732..a578bd3 100644 Binary files a/ios/RCTJVerificationModule/OAuth.framework/OAuth and b/ios/RCTJVerificationModule/OAuth.framework/OAuth differ diff --git a/ios/RCTJVerificationModule/OAuth.framework/_CodeSignature/CodeDirectory b/ios/RCTJVerificationModule/OAuth.framework/_CodeSignature/CodeDirectory index 20dba9c..307b543 100644 Binary files a/ios/RCTJVerificationModule/OAuth.framework/_CodeSignature/CodeDirectory and b/ios/RCTJVerificationModule/OAuth.framework/_CodeSignature/CodeDirectory differ diff --git a/ios/RCTJVerificationModule/OAuth.framework/_CodeSignature/CodeRequirements b/ios/RCTJVerificationModule/OAuth.framework/_CodeSignature/CodeRequirements index a6c7f00..a0c20e3 100644 Binary files a/ios/RCTJVerificationModule/OAuth.framework/_CodeSignature/CodeRequirements and b/ios/RCTJVerificationModule/OAuth.framework/_CodeSignature/CodeRequirements differ diff --git a/ios/RCTJVerificationModule/OAuth.framework/_CodeSignature/CodeRequirements-1 b/ios/RCTJVerificationModule/OAuth.framework/_CodeSignature/CodeRequirements-1 index a036bec..3537d17 100644 Binary files a/ios/RCTJVerificationModule/OAuth.framework/_CodeSignature/CodeRequirements-1 and b/ios/RCTJVerificationModule/OAuth.framework/_CodeSignature/CodeRequirements-1 differ diff --git a/ios/RCTJVerificationModule/OAuth.framework/_CodeSignature/CodeResources b/ios/RCTJVerificationModule/OAuth.framework/_CodeSignature/CodeResources index b96243d..2258065 100644 --- a/ios/RCTJVerificationModule/OAuth.framework/_CodeSignature/CodeResources +++ b/ios/RCTJVerificationModule/OAuth.framework/_CodeSignature/CodeResources @@ -6,19 +6,19 @@ Headers/ZOAuthManager.h - Bun83md0uveA8cIrtE31ZJYCthc= + Ienx6rvM1g1+f1s7ZICmHjFTWK0= Headers/ZTOAuthManager.h - W8L0JfrdTB9W3S5SdC2zPmM1Rlc= + Yg0RW8IZws/IkK5JfNHdJdauFUI= Headers/ZUOAuthManager.h - tzyoPulBaM4s/LiEv8eFPDvr4+8= + vQjZ3rGnvPH5unmuuAhhNN8BuyM= Info.plist - 2InJOhviyxiEUEDvWKLjWpx7JC4= + m9bTZOiOQOril/llA+1ZmQa8v6c= files2 @@ -27,33 +27,33 @@ hash - Bun83md0uveA8cIrtE31ZJYCthc= + Ienx6rvM1g1+f1s7ZICmHjFTWK0= hash2 - 6NM3+En9MHSJDwLVUUjZHCl8qV9REUn8vk5KJ9uUmz8= + q7QhcCkG76qNNTTXIdCJVpT3OaL/Zf4INFSddKsq2jA= Headers/ZTOAuthManager.h hash - W8L0JfrdTB9W3S5SdC2zPmM1Rlc= + Yg0RW8IZws/IkK5JfNHdJdauFUI= hash2 - jxCbjRLpgvjUYA9vL11GYSnlW36YQGR75olIqQRLYgQ= + gYAD75XQd+0Hpf0wLqki0J7t4JstOCS8Kp7HwSQV5/U= Headers/ZUOAuthManager.h hash - tzyoPulBaM4s/LiEv8eFPDvr4+8= + vQjZ3rGnvPH5unmuuAhhNN8BuyM= hash2 - qa2pFGssrYGjUwMIptLo7AfKEbJDG7Ueas7fRikyksI= + 26cP5YgH1gCN4jat375TLZNSe8qBLXi/mvTCLS8GHP8= diff --git a/ios/RCTJVerificationModule/OAuth.framework/_CodeSignature/CodeSignature b/ios/RCTJVerificationModule/OAuth.framework/_CodeSignature/CodeSignature index 3a19420..0e035cd 100644 Binary files a/ios/RCTJVerificationModule/OAuth.framework/_CodeSignature/CodeSignature and b/ios/RCTJVerificationModule/OAuth.framework/_CodeSignature/CodeSignature differ diff --git a/ios/RCTJVerificationModule/RCTJVerificationModule.m b/ios/RCTJVerificationModule/RCTJVerificationModule.m index 3fb6b06..0000ae0 100644 --- a/ios/RCTJVerificationModule/RCTJVerificationModule.m +++ b/ios/RCTJVerificationModule/RCTJVerificationModule.m @@ -81,6 +81,7 @@ //隐私条款 #define PRIVACY_ONE @"privacyOne" //隐私条款一:数组(务必按顺序)@[条款名称,条款链接] #define PRIVACY_TWO @"privacyTwo" //隐私条款二:数组(务必按顺序)@[条款名称,条款链接] +#define PRIVACY_Arr @"privacyNameAndUrlBeanList" //隐私条款组合:数组(务必按顺序)@[[条款名称,条款链接],[条款名称,条款链接]] #define PRIVACY_COLOR @"privacyColor" //隐私条款名称颜色 @[基础文字颜色,条款颜色] #define PRIVACY_TEXT @"privacyText" //隐私条款拼接文本数组 #define PRIVACY_TEXT_SIZE @"privacyTextSize" //隐私条款字体大小,默认12 @@ -105,6 +106,7 @@ #define PRIVACY_WEB_NAV_TITLE_SIZE @"privacyWebNavTitleSize" //协议页导航栏标题字体大小 #define PRIVACY_WEB_NAV_TITLE_COLOR @"privacyWebNavTitleColor" //协议页导航栏标题字体颜色 #define PRIVACY_WEB_NAV_RETURN_IMAGE @"privacyWebNavReturnImage" //协议页导航栏返回按钮图片 +#define PRIVACY_WEB_NAV_NAVCUSTOM @"privacyWebNavNavCustom" //协议页导航是否隐藏 //弹窗 #define SHOW_WINDOW @"showWindow" // 是否弹窗,默认no @@ -137,7 +139,7 @@ + (BOOL)requiresMainQueueSetup } RCT_EXPORT_METHOD(setupWithConfig: (NSDictionary *)params - callback: (RCTResponseSenderBlock)callback) + callback: (RCTResponseSenderBlock)callback) { JVAuthConfig *config = [[JVAuthConfig alloc] init]; if (params[@"appKey"]) { @@ -177,9 +179,9 @@ + (BOOL)requiresMainQueueSetup RCT_EXPORT_METHOD(checkVerifyEnable: (RCTResponseSenderBlock)callback) { - BOOL enable = [JVERIFICATIONService checkVerifyEnable]; - NSDictionary *data = [self convertToResult:enable]; - callback(@[data]); + BOOL enable = [JVERIFICATIONService checkVerifyEnable]; + NSDictionary *data = [self convertToResult:enable]; + callback(@[data]); } RCT_EXPORT_METHOD(getToken: (double)params @@ -284,7 +286,7 @@ + (BOOL)requiresMainQueueSetup NSString *phoneNumber = @""; NSString *signID = @""; NSString *templateID = @""; - + if(params[@"phoneNumber"]){ phoneNumber = params[@"phoneNumber"]; } @@ -377,7 +379,7 @@ -(JVUIConfig *)convertToCinfig: (NSDictionary *)configParams } //导航栏 if([configParams[NAV_HIDDEN] isKindOfClass:[NSNumber class]]){ - config.navCustom = [configParams[NAV_HIDDEN] boolValue]; + config.navCustom = [configParams[NAV_HIDDEN] boolValue]; } if(configParams[NAV_COLOR]){ NSNumber *color = configParams[NAV_COLOR]; @@ -508,6 +510,52 @@ -(JVUIConfig *)convertToCinfig: (NSDictionary *)configParams NSArray *parivacyTwo = configParams[PRIVACY_TWO]; config.appPrivacyTwo = parivacyTwo; } + + //2.7.3新增 自定义协议组合 + if([[configParams allKeys] containsObject:PRIVACY_Arr] && configParams[PRIVACY_Arr]){ + NSArray *parivacyArr = configParams[PRIVACY_Arr]; + NSMutableArray *appPrivacyss = [NSMutableArray array]; + //设置头 如勾选即同意 + if([[configParams allKeys] containsObject:PRIVACY_TEXT] && configParams[PRIVACY_TEXT]){ + NSArray *privacyTexts = configParams[PRIVACY_TEXT]; + if ([privacyTexts count]>0) + [appPrivacyss addObject:privacyTexts[0]]; + } + //自定义协议部分 + for (NSInteger i = 0; i1) + [appPrivacyss addObject:privacyTexts[1]]; + } + //设置 + if (appPrivacyss.count>1) { + config.appPrivacys = appPrivacyss; + } + } + if(configParams[PRIVACY_COLOR]){ NSNumber *privacyNameColorNum = configParams[PRIVACY_COLOR][0]; NSNumber *privacyUrlColorNum = configParams[PRIVACY_COLOR][1]; @@ -572,7 +620,7 @@ -(JVUIConfig *)convertToCinfig: (NSDictionary *)configParams } } - + CGFloat privacyCheckboxW = config.uncheckedImg.size.width; CGFloat privacyCheckboxH = config.uncheckedImg.size.height; JVLayoutConstraint *constraintX = [JVLayoutConstraint constraintWithAttribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:JVLayoutItemPrivacy attribute:NSLayoutAttributeLeft multiplier:1 constant:-15]; @@ -580,7 +628,7 @@ -(JVUIConfig *)convertToCinfig: (NSDictionary *)configParams JVLayoutConstraint *constraintW = [JVLayoutConstraint constraintWithAttribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:JVLayoutItemNone attribute:NSLayoutAttributeWidth multiplier:1 constant:privacyCheckboxW]; JVLayoutConstraint *constraintH = [JVLayoutConstraint constraintWithAttribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:JVLayoutItemNone attribute:NSLayoutAttributeHeight multiplier:1 constant:privacyCheckboxH]; config.checkViewConstraints = @[constraintX,constraintY,constraintW,constraintH]; - + if(configParams[CHECK_VIEW_CONSTRAINTS]){ NSArray *checkViewConstraints= [RCTJVerificationModule configConstraintWithAttributes:configParams[CHECK_VIEW_CONSTRAINTS]]; config.checkViewConstraints = checkViewConstraints; @@ -609,7 +657,10 @@ -(JVUIConfig *)convertToCinfig: (NSDictionary *)configParams if(configParams[PRIVACY_WEB_NAV_RETURN_IMAGE]){ config.agreementNavReturnImage = [self imageNamed:configParams[PRIVACY_WEB_NAV_RETURN_IMAGE]]; } - + //2.7.5新增隐私协议导航栏是否隐藏 + if([[configParams allKeys] containsObject:PRIVACY_WEB_NAV_NAVCUSTOM] && configParams[PRIVACY_WEB_NAV_NAVCUSTOM]){ + config.privacysNavCustom = [self imageNamed:configParams[PRIVACY_WEB_NAV_NAVCUSTOM]]; + } // 弹窗 if([configParams[SHOW_WINDOW] isKindOfClass:[NSNumber class]]){ config.showWindow = [configParams[SHOW_WINDOW] boolValue]; @@ -621,7 +672,7 @@ -(JVUIConfig *)convertToCinfig: (NSDictionary *)configParams CGFloat backgroundAlpha = [configParams[WINDOW_BACKGROUND_ALPHA] floatValue]; config.windowBackgroundAlpha = backgroundAlpha; } - + if(configParams[WINDOW_CORNER_RADIUS]){ CGFloat cornerRadius = [configParams[WINDOW_CORNER_RADIUS] floatValue]; config.windowCornerRadius = cornerRadius; diff --git a/ios/RCTJVerificationModule/TYRZUISDK.framework/Headers/TYRZSDK.h b/ios/RCTJVerificationModule/TYRZUISDK.framework/Headers/TYRZSDK.h old mode 100755 new mode 100644 diff --git a/ios/RCTJVerificationModule/TYRZUISDK.framework/Headers/UASDKErrorCode.h b/ios/RCTJVerificationModule/TYRZUISDK.framework/Headers/UASDKErrorCode.h old mode 100755 new mode 100644 diff --git a/ios/RCTJVerificationModule/TYRZUISDK.framework/TYRZUISDK b/ios/RCTJVerificationModule/TYRZUISDK.framework/TYRZUISDK old mode 100755 new mode 100644 diff --git a/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/Headers/UniAuthHelper.h b/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/Headers/UniAuthHelper.h index e693d3c..9228d2f 100644 --- a/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/Headers/UniAuthHelper.h +++ b/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/Headers/UniAuthHelper.h @@ -4,30 +4,59 @@ // // Created by zhuof on 2018/3/8. // Copyright © 2018年 xiaowo. All rights reserved. -// 4.1.3IR01B0320 优化token获取流程。 减少交互。 使用者自行缓存accessCode(具备有效期)。 -// +// 4.1.3IR01B0320 1. 优化token获取流程。 减少交互。 使用者自行缓存accessCode(具备有效期)。 +// 4.3.0IR01B0615 1. socket通讯优化(GCD方案) +// 4.4.0IR01B0715 1. 预取号流程修改 2.增加读取idfa的功能 3.降低打点频率。 +// 4.5.0IR01B1020 1. 关闭日志 2.错误码细化 +// 4.6.0IR01B0105 1. http1.1规范 header部分头域兼容大小写,兼容http链接中缺少80端口问题。 +// 2. socket请求时,host头域追加端口号 +// 3. 仅数据网络开通和wifi双开时,都启动预取号计时器。 +// 4. 按照阿里建议, 超时时间可以设置x.x秒样式 #import -typedef void (^UniResultListener)(NSDictionary *data); +typedef void (^UniResultListener)(NSDictionary * _Nonnull data); @interface UniAuthHelper : NSObject -+(UniAuthHelper *) getInstance; - --(void) initWithAppId:(NSString*) appId appSecret:(NSString*) appSecret; - -//-(void) login :(double)timeout listener:(UniResultListener) listener; - --(void) getAccessCode :(double)timeout listener:(UniResultListener) listener; - -//20200320 yangzc36 token优化,删除该接口 -//-(void) getAccessToken :(double)timeout accessCode:(NSString *)accessCode listener:(UniResultListener) listener; - --(void) mobileAuth :(double)timeout listener:(UniResultListener) listener; - ++(UniAuthHelper *_Nonnull) getInstance; + +/** + sdk初始化,每个app只能执行一次初始化调用。 + 注意:某些使用者尝试在同一个app中使用多个appid初始化sdk,这可能导致未知隐患发生。 + */ +-(void) initWithAppId:(NSString* _Nonnull) appId appSecret:(NSString* _Nonnull) appSecret; + +/** + 预取号接口。 + timeout:超时时间,单位秒(网络环境复杂,建议设置3秒以上,过低的超时时间可能导致取号成功率下降)。 + listener:回调接口 resultCode 为 0时,表示预取号成功。 其他值都是错误码。 + + 成功调用有以下前提: + 1. 需要保证手机终端有联通sim卡,并且保证联通数据网络是开启状态。 + 2. 手机本地时间正确(北京时间) + 3. 如果手机数据网络开启,但是预取号失败,可以尝试手动飞行模式开关一下,尝试让数据网络恢复正常。 + 4. 物联网卡无法取号 + 5. 海外,港澳地区无法取号 + 6. 确保APN接入点设置正确 + + 预取号获得的accessCode具有效期,请在有效期内使用accesscode换取用户信息。 + */ +-(void) getAccessCode:(double)timeout listener:(UniResultListener _Nonnull) listener; + +/** + 获取号码认证用的accessCode + */ +-(void) mobileAuth:(double)timeout listener:(UniResultListener _Nonnull) listener; + +/** + 日志默认开启。正式发布时,可选择关闭。 + */ -(void) printConsoleEnable:(BOOL)enable; --(NSString*) getSdkVersion; +/** + 获取sdk的版本号 + */ +-(NSString*_Nonnull) getSdkVersion; @end diff --git a/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/Info.plist b/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/Info.plist index d2366a6..391823e 100644 Binary files a/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/Info.plist and b/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/Info.plist differ diff --git a/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/account_login_sdk_noui_core b/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/account_login_sdk_noui_core index 734cb09..c156ef4 100644 Binary files a/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/account_login_sdk_noui_core and b/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/account_login_sdk_noui_core differ diff --git a/ios/RCTJVerificationModule/libjverification-ios-2.6.7.a b/ios/RCTJVerificationModule/libjverification-ios-2.7.5.a similarity index 71% rename from ios/RCTJVerificationModule/libjverification-ios-2.6.7.a rename to ios/RCTJVerificationModule/libjverification-ios-2.7.5.a index b2d9406..956d993 100644 Binary files a/ios/RCTJVerificationModule/libjverification-ios-2.6.7.a and b/ios/RCTJVerificationModule/libjverification-ios-2.7.5.a differ diff --git a/package.json b/package.json index 2393fa4..a203b15 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "license": "ISC", "author": "wicked.tc130", - "version": "2.4.7", + "version": "2.4.9", "repository": { "type": "git", "url": "https://github.com/jpush/jverification-react-native" diff --git "a/\350\256\244\350\257\201SDK\346\216\210\346\235\203\351\241\265\351\235\242\345\205\203\347\264\240\351\205\215\347\275\256API\350\257\264\346\230\216.md" "b/\350\256\244\350\257\201SDK\346\216\210\346\235\203\351\241\265\351\235\242\345\205\203\347\264\240\351\205\215\347\275\256API\350\257\264\346\230\216.md" index 83fd384..1f13375 100644 --- "a/\350\256\244\350\257\201SDK\346\216\210\346\235\203\351\241\265\351\235\242\345\205\203\347\264\240\351\205\215\347\275\256API\350\257\264\346\230\216.md" +++ "b/\350\256\244\350\257\201SDK\346\216\210\346\235\203\351\241\265\351\235\242\345\205\203\347\264\240\351\205\215\347\275\256API\350\257\264\346\230\216.md" @@ -185,6 +185,7 @@ |:-----:|:----:|:----:| |privacyOne|String,String|设置开发者隐私条款1名称和URL(名称,url)| |privacyTwo|String,String|设置开发者隐私条款2名称和URL(名称,url)| +|privacyArr|[[String,String],[String,String]]|设置开发者隐私条款2名称和URL(名称,url)| |privacyColor|int,int|设置隐私条款名称颜色(基础文字颜色,协议文字颜色)| |privacyText|String,String,String,String|设置隐私条款名称外的文字。
如:登录即同意...和...、...并使用本机号码登录
参数1为:"登录即同意"。
参数2为:"和"。
参数3为:"、"。
参数4为:"并使用本机号码登录"。
| |privacyTextSize|int|设置隐私条款文字字体大小(单位:sp)。|