diff --git a/android/build.gradle b/android/build.gradle
index 3da0b5d..e9f1558 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -34,6 +34,7 @@ repositories {
}
dependencies {
- api fileTree(include: ['*.jar'], dir: 'libs')
+// api fileTree(include: ['*.jar'], dir: 'libs')
implementation "com.facebook.react:react-native:${safeExtGet('reactNativeVersion', '+')}"
+ implementation 'cn.jiguang.sdk:jverification:2.1.0'
}
diff --git a/android/libs/jverification-android-release-1.1.2.jar b/android/libs/jverification-android-release-1.1.2.jar
deleted file mode 100644
index 425de96..0000000
Binary files a/android/libs/jverification-android-release-1.1.2.jar and /dev/null differ
diff --git a/android/src/main/java/cn/jpush/reactnativejvrification/JVerificationConstant.java b/android/src/main/java/cn/jpush/reactnativejvrification/JVerificationConstant.java
new file mode 100644
index 0000000..24c88bd
--- /dev/null
+++ b/android/src/main/java/cn/jpush/reactnativejvrification/JVerificationConstant.java
@@ -0,0 +1,36 @@
+package cn.jpush.reactnativejvrification;
+
+class JVerificationConstant {
+ //导航栏
+ static final String NAV_COLOR = "navColor";
+ static final String NAV_TEXT = "navText";
+ static final String NAV_TEXT_COLOR = "navTextColor";
+ static final String NAV_RETURN_IMAGE = "navReturnImage";
+ //logo
+ static final String LOGO_HIDDEN = "logoHidden";
+ static final String LOGO_Width = "logoWidth";
+ static final String LOGO_Height = "logoHeight";
+ static final String LOGO_Image = "logoImage";
+ static final String LOGO_OFFSET_Y = "logoOffsetY";
+ //手机号码
+ static final String NUM_COLOR = "numColor";
+ static final String NUM_OFFSET_Y = "numOffsetY";
+ //slogan
+ static final String SLOGAN_TEXT_COLOR = "sloganTextColor";
+ static final String SLOGAN_OFFSET_Y = "sloganOffsetY";
+ //登录按钮
+ static final String LOGIN_BTN_TEXT = "loginBtnText";
+ static final String LOGIN_BTN_TEXT_COLOR = "loginBtnTextColor";
+ static final String LOGIN_BTN_IMAGE = "loginBtnImage";
+ static final String LOGIN_BTN_OFFSET_Y = "loginBtnOffsetY";
+ //隐私条款
+ static final String PRIVACY_ONE_NAME = "privacyOneName";
+ static final String PRIVACY_ONE_URL = "privacyOneUrl";
+ static final String PRIVACY_TWO_NAME = "privacyTwoName";
+ static final String PRIVACY_TWO_URL = "privacyTwoUrl";
+ static final String PRIVACY_BASIC_COLOR = "privacyBasicColor";
+ static final String PRIVACY_PROTOCOL_COLOR = "privacyProtocolColor";
+ static final String PRIVACY_CHECK_IMAGE = "privacyCheckImage";
+ static final String PRIVACY_UNCHECK_IMAGE = "privacyUncheckImage";
+ static final String PRIVACY_OFFSET_Y = "privacyOffsetY";
+}
diff --git a/android/src/main/java/cn/jpush/reactnativejvrification/JVerificationModule.java b/android/src/main/java/cn/jpush/reactnativejvrification/JVerificationModule.java
index e84f91a..debcf1e 100644
--- a/android/src/main/java/cn/jpush/reactnativejvrification/JVerificationModule.java
+++ b/android/src/main/java/cn/jpush/reactnativejvrification/JVerificationModule.java
@@ -1,7 +1,6 @@
package cn.jpush.reactnativejvrification;
import android.Manifest;
-import android.util.Log;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.Callback;
@@ -13,6 +12,7 @@
import com.facebook.react.bridge.WritableMap;
import cn.jiguang.verifysdk.api.JVerificationInterface;
+import cn.jiguang.verifysdk.api.JVerifyUIConfig;
import cn.jiguang.verifysdk.api.VerifyListener;
import cn.jpush.reactnativejvrification.utils.AndroidUtils;
@@ -51,19 +51,13 @@ public void initialize() {
super.initialize();
}
- @ReactMethod
- public void setup(ReadableMap map) {
- JVerificationInterface.init(getCurrentActivity());
- }
-
@ReactMethod
public void requestPermission(Callback permissionCallback) {
if (AndroidUtils.checkPermission(getCurrentActivity(), REQUIRED_PERMISSIONS)) {
- doCallback(permissionCallback,CODE_PERMISSION_GRANTED,MSG_PERMISSION_GRANTED);
+ doCallback(permissionCallback, CODE_PERMISSION_GRANTED, MSG_PERMISSION_GRANTED);
return;
}
this.permissionCallback = permissionCallback;
- Log.i(TAG,"requestPermission");
try {
AndroidUtils.requestPermission(getCurrentActivity(), REQUIRED_PERMISSIONS);
requestPermissionSended = true;
@@ -72,46 +66,128 @@ public void requestPermission(Callback permissionCallback) {
}
}
-
@ReactMethod
- public void setDebug(boolean enable) {
+ public void setDebugMode(boolean enable) {
JVerificationInterface.setDebugMode(enable);
}
+ @ReactMethod
+ public void init() {
+ JVerificationInterface.init(getCurrentActivity());
+ }
+
+ @ReactMethod
+ public void checkVerifyEnable(Callback callback) {
+ boolean isVerifyEnable = JVerificationInterface.checkVerifyEnable(getCurrentActivity());
+ WritableMap map = Arguments.createMap();
+ map.putBoolean("enable", isVerifyEnable);
+ callback.invoke(map);
+ }
+
@ReactMethod
public void getToken(final Callback callback) {
JVerificationInterface.getToken(getCurrentActivity(), new VerifyListener() {
@Override
- public void onResult(int code, String content, String operato) {
- doCallback(callback,code,content);
+ public void onResult(int code, String content, String operator) {
+ doCallback(callback, code, content, operator);
}
});
}
@ReactMethod
- public void verifyNumber(ReadableMap map,final Callback callback) {
+ public void verifyNumber(ReadableMap map, final Callback callback) {
String number = map.getString("number");
String token = map.getString("token");
JVerificationInterface.verifyNumber(getCurrentActivity(), token, number, new VerifyListener() {
@Override
public void onResult(int code, String content, String operator) {
- doCallback(callback,code,content);
+ doCallback(callback, code, content, operator);
}
});
}
+ @ReactMethod
+ public void loginAuth(final Callback callback) {
+ JVerificationInterface.loginAuth(getCurrentActivity(), new VerifyListener() {
+ @Override
+ public void onResult(int code, String token, String operator) {
+ doCallback(callback, code, token, operator);
+ }
+ });
+ }
+
+ @ReactMethod
+ public void setCustomUIWithConfig(ReadableMap map) {
+ JVerifyUIConfig uiConfig = convertMapToConfig(map);
+ JVerificationInterface.setCustomUIWithConfig(uiConfig);
+ }
+
+ private JVerifyUIConfig convertMapToConfig(ReadableMap map) {
+ int navColor = map.hasKey(JVerificationConstant.NAV_COLOR) ? map.getInt(JVerificationConstant.NAV_COLOR) : -16742704;
+ String navText = map.hasKey(JVerificationConstant.NAV_TEXT) ? map.getString(JVerificationConstant.NAV_TEXT) : "登录";
+ int navTextColor = map.hasKey(JVerificationConstant.NAV_TEXT_COLOR) ? map.getInt(JVerificationConstant.NAV_TEXT_COLOR) : -1;
+ String navReturnImage = map.hasKey(JVerificationConstant.NAV_RETURN_IMAGE) ? map.getString(JVerificationConstant.NAV_RETURN_IMAGE) : "umcsdk_return_bg";
+ boolean isLogoHidden = map.hasKey(JVerificationConstant.LOGO_HIDDEN) && map.getBoolean(JVerificationConstant.LOGO_HIDDEN);
+ String logoImage = map.hasKey(JVerificationConstant.LOGO_Image) ? map.getString(JVerificationConstant.LOGO_Image) : null;
+ int logoWidth = map.hasKey(JVerificationConstant.LOGO_Width) ? map.getInt(JVerificationConstant.LOGO_Width) : 70;
+ int logoHeight = map.hasKey(JVerificationConstant.LOGO_Height) ? map.getInt(JVerificationConstant.LOGO_Height) : 70;
+ int logoOffsetY = map.hasKey(JVerificationConstant.LOGO_OFFSET_Y) ? map.getInt(JVerificationConstant.LOGO_OFFSET_Y) : 50;
+ int numColor = map.hasKey(JVerificationConstant.NUM_COLOR) ? map.getInt(JVerificationConstant.NUM_COLOR) : -16742704;
+ int numOffsetY = map.hasKey(JVerificationConstant.NUM_OFFSET_Y) ? map.getInt(JVerificationConstant.NUM_OFFSET_Y) : 184;
+ int sloganTextColor = map.hasKey(JVerificationConstant.SLOGAN_TEXT_COLOR) ? map.getInt(JVerificationConstant.SLOGAN_TEXT_COLOR) : -1;
+ int sloganOffsetY = map.hasKey(JVerificationConstant.SLOGAN_OFFSET_Y) ? map.getInt(JVerificationConstant.SLOGAN_OFFSET_Y) : 224;
+ String loginBtnText = map.hasKey(JVerificationConstant.LOGIN_BTN_TEXT) ? map.getString(JVerificationConstant.LOGIN_BTN_TEXT) : "本机号码一键登录";
+ int loginBtnTextColor = map.hasKey(JVerificationConstant.LOGIN_BTN_TEXT_COLOR) ? map.getInt(JVerificationConstant.LOGIN_BTN_TEXT_COLOR) : -1;
+ String loginBtnImage = map.hasKey(JVerificationConstant.LOGIN_BTN_IMAGE) ? map.getString(JVerificationConstant.LOGIN_BTN_IMAGE) : "umcsdk_login_btn_bg";
+ int loginBtnOffsetY = map.hasKey(JVerificationConstant.LOGIN_BTN_OFFSET_Y) ? map.getInt(JVerificationConstant.LOGIN_BTN_OFFSET_Y) : 254;
+ String privacyOneName = map.hasKey(JVerificationConstant.PRIVACY_ONE_NAME) ? map.getString(JVerificationConstant.PRIVACY_ONE_NAME) : null;
+ String privacyOneUrl = map.hasKey(JVerificationConstant.PRIVACY_ONE_URL) ? map.getString(JVerificationConstant.PRIVACY_ONE_URL) : null;
+ String privacyTwoName = map.hasKey(JVerificationConstant.PRIVACY_TWO_NAME) ? map.getString(JVerificationConstant.PRIVACY_TWO_NAME) : null;
+ String privacyTwoUrl = map.hasKey(JVerificationConstant.PRIVACY_TWO_URL) ? map.getString(JVerificationConstant.PRIVACY_TWO_URL) : null;
+ int privacyBasicColor = map.hasKey(JVerificationConstant.PRIVACY_BASIC_COLOR) ? map.getInt(JVerificationConstant.PRIVACY_BASIC_COLOR) : -10066330;
+ int privacyProtocolColor = map.hasKey(JVerificationConstant.PRIVACY_PROTOCOL_COLOR) ? map.getInt(JVerificationConstant.PRIVACY_PROTOCOL_COLOR) : -16007674;
+ int privacyOffsetY = map.hasKey(JVerificationConstant.PRIVACY_OFFSET_Y) ? map.getInt(JVerificationConstant.PRIVACY_OFFSET_Y) : 30;
+ String checkImage = map.hasKey(JVerificationConstant.PRIVACY_CHECK_IMAGE) ? map.getString(JVerificationConstant.PRIVACY_CHECK_IMAGE) : "umcsdk_check_image";
+ String unCheckImage = map.hasKey(JVerificationConstant.PRIVACY_UNCHECK_IMAGE) ? map.getString(JVerificationConstant.PRIVACY_UNCHECK_IMAGE) : "umcsdk_uncheck_image";
+
+ return new JVerifyUIConfig.Builder()
+ .setNavColor(navColor)
+ .setNavText(navText)
+ .setNavTextColor(navTextColor)
+ .setNavReturnImgPath(navReturnImage)
+ .setLogoHidden(isLogoHidden)
+ .setLogoImgPath(logoImage)
+ .setLogoWidth(logoWidth)
+ .setLogoHeight(logoHeight)
+ .setLogoOffsetY(logoOffsetY)
+ .setNumberColor(numColor)
+ .setNumFieldOffsetY(numOffsetY)
+ .setSloganTextColor(sloganTextColor)
+ .setSloganOffsetY(sloganOffsetY)
+ .setLogBtnText(loginBtnText)
+ .setLogBtnTextColor(loginBtnTextColor)
+ .setLogBtnImgPath(loginBtnImage)
+ .setLogBtnOffsetY(loginBtnOffsetY)
+ .setAppPrivacyOne(privacyOneName, privacyOneUrl)
+ .setAppPrivacyTwo(privacyTwoName, privacyTwoUrl)
+ .setAppPrivacyColor(privacyBasicColor, privacyProtocolColor)
+ .setPrivacyOffsetY(privacyOffsetY)
+ .setCheckedImgPath(checkImage)
+ .setUncheckedImgPath(unCheckImage)
+ .build();
+ }
+
@Override
public void onHostResume() {
if (requestPermissionSended) {
if (AndroidUtils.checkPermission(getCurrentActivity(), REQUIRED_PERMISSIONS)) {
- doCallback(permissionCallback,CODE_PERMISSION_GRANTED,MSG_PERMISSION_GRANTED);
+ doCallback(permissionCallback, CODE_PERMISSION_GRANTED, MSG_PERMISSION_GRANTED);
} else {
- doCallback(permissionCallback,ERR_CODE_PERMISSION,ERR_MSG_PERMISSION);
+ doCallback(permissionCallback, ERR_CODE_PERMISSION, ERR_MSG_PERMISSION);
}
}
requestPermissionSended = false;
-
}
@Override
@@ -124,10 +200,18 @@ public void onHostDestroy() {
}
- private void doCallback(Callback callback, int code, String content){
+ private void doCallback(Callback callback, int code, String content) {
+ WritableMap map = Arguments.createMap();
+ map.putInt("code", code);
+ map.putString("content", content);
+ callback.invoke(map);
+ }
+
+ private void doCallback(Callback callback, int code, String content, String operator) {
WritableMap map = Arguments.createMap();
- map.putInt("code",code);
- map.putString("content",content);
+ map.putInt("code", code);
+ map.putString("content", content);
+ map.putString("operator", operator);
callback.invoke(map);
}
}
diff --git a/example/App.js b/example/App.js
index c5cedc8..6b89e7e 100644
--- a/example/App.js
+++ b/example/App.js
@@ -3,15 +3,16 @@ import { StyleSheet, Text, View, TouchableHighlight, ScrollView, TextInput, Aler
import JVerification from 'jverification-react-native'
var styles = StyleSheet.create({
- parent: {
- padding: 35,
-
- flexDirection: 'column',
+ container: {
+ flex: 1,
justifyContent: 'center',
alignItems: 'center',
+ backgroundColor: '#F5FCFF',
},
setBtnStyle: {
- width: 180,
+ width: 280,
+ justifyContent: 'center',
+ alignItems: 'center',
marginTop: 10,
borderWidth: 1,
borderColor: '#3e83d7',
@@ -51,7 +52,44 @@ class Button extends React.Component {
}
}
-// type Props = {};
+//一键登录页面自定义配置,需要在调用login之前设置
+var config = {
+ navColor:-16742704, //导航栏颜色
+ navText: "一键登录", //导航栏标题
+ navTextColor:-1, //导航栏标题文字颜色
+ navReturnImage:"自定义返回按钮图片", //导航栏左侧返回按钮
+
+ logoHidden:false, //logo是否隐藏
+ logoImage:"umcsdk_mobile_logo", //logo(android默认为应用图标;ios默认无)
+ logoWidth:100, //logo宽
+ logoHeight:100, //logo高
+ logoOffsetY:75, //logo相对导航栏向下偏移量
+
+ numberColor:-16742704, //手机号码文字颜色
+ numOffsetY:200, //手机号码相对导航栏向下偏移量
+
+ sloganTextColor:-16742704, //slogan文字颜色
+ sloganOffsetY:250, //slogan相对导航栏向下偏移量
+
+ loginBtnText:"本机号码登录", //登录按钮文字
+ loginBtnTextColor:-1, //登录按钮文字颜色
+ loginBtnImageStyle:"自定义登录按钮样式", //登录按钮selector选择样式 (仅android)
+ loginBtnNormalImage:"自定义登录按钮正常图片", //登录按钮正常图片 (仅ios,三个同时设置生效)
+ loginBtnUnableImage:"自定义登录按钮失效图片", //登录按钮失效图片 (仅ios,三个同时设置生效)
+ loginBtnPressedImage:"自定义登录按钮按下图片", //登录按钮按下图片 (仅ios,三个同时设置生效)
+
+ loginBtnOffsetY:280, //登录按钮相对导航栏向下偏移量
+
+ privacyOneName:"自定义隐私条款一", //隐私条款一
+ privacyOneUrl:"https://www.jiguang.cn", //隐私条款一链接
+ privacyTwoName:"自定义隐私条款二", //隐私条款二
+ privacyTwoUrl:"https://www.jiguang.cn", //隐私条款二链接
+ privacyBasicColor:-16742704, //隐私条款基础文字颜色
+ privacyProtocolColor:-16777216, //隐私条款文字颜色
+ privacyCheckImage:"自定义选择图片", //隐私条款复选框选中图片
+ privacyUncheckImage:"自定义未选择图片", //隐私条款复选框未选中图片
+ privacyOffsetY:20 //隐私条款相对底部向上偏移量
+}
export default class App extends React.Component {
constructor(props){
@@ -63,18 +101,23 @@ export default class App extends React.Component {
return (
);
}
}
-const styles = StyleSheet.create({
- container: {
- flex: 1,
- justifyContent: 'center',
- alignItems: 'center',
- backgroundColor: '#F5FCFF',
- },
- welcome: {
- fontSize: 20,
- textAlign: 'center',
- margin: 10,
- },
- instructions: {
- textAlign: 'center',
- color: '#333333',
- marginBottom: 5,
- },
-});
+// const styles = StyleSheet.create({
+// container: {
+// flex: 1,
+// justifyContent: 'center',
+// alignItems: 'center',
+// backgroundColor: '#F5FCFF',
+// },
+// welcome: {
+// fontSize: 20,
+// textAlign: 'center',
+// margin: 10,
+// },
+// instructions: {
+// textAlign: 'center',
+// color: '#333333',
+// marginBottom: 5,
+// },
+// });
\ No newline at end of file
diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle
index 102f4ba..fe4d20c 100644
--- a/example/android/app/build.gradle
+++ b/example/android/app/build.gradle
@@ -108,7 +108,7 @@ android {
}
manifestPlaceholders = [
- JPUSH_APPKEY: "your appkey", //在此替换你的APPKey
+ JPUSH_APPKEY: "c27b85df1b4fb86a1d507a50", //在此替换你的APPKey
JPUSH_CHANNEL: "developer-default" //应用渠道号
]
}
diff --git a/example/ios/JVerificationResource.bundle/checkBox_selected@2x.png b/example/ios/JVerificationResource.bundle/checkBox_selected@2x.png
new file mode 100755
index 0000000..f441148
Binary files /dev/null and b/example/ios/JVerificationResource.bundle/checkBox_selected@2x.png differ
diff --git a/example/ios/JVerificationResource.bundle/checkBox_selected@3x.png b/example/ios/JVerificationResource.bundle/checkBox_selected@3x.png
new file mode 100755
index 0000000..3f5d407
Binary files /dev/null and b/example/ios/JVerificationResource.bundle/checkBox_selected@3x.png differ
diff --git a/example/ios/JVerificationResource.bundle/checkBox_unSelected@2x.png b/example/ios/JVerificationResource.bundle/checkBox_unSelected@2x.png
new file mode 100755
index 0000000..e044d7c
Binary files /dev/null and b/example/ios/JVerificationResource.bundle/checkBox_unSelected@2x.png differ
diff --git a/example/ios/JVerificationResource.bundle/checkBox_unSelected@3x.png b/example/ios/JVerificationResource.bundle/checkBox_unSelected@3x.png
new file mode 100755
index 0000000..d8cf911
Binary files /dev/null and b/example/ios/JVerificationResource.bundle/checkBox_unSelected@3x.png differ
diff --git a/example/ios/JVerificationResource.bundle/close@2x.png b/example/ios/JVerificationResource.bundle/close@2x.png
new file mode 100755
index 0000000..0345457
Binary files /dev/null and b/example/ios/JVerificationResource.bundle/close@2x.png differ
diff --git a/example/ios/JVerificationResource.bundle/close@3x.png b/example/ios/JVerificationResource.bundle/close@3x.png
new file mode 100755
index 0000000..0a07865
Binary files /dev/null and b/example/ios/JVerificationResource.bundle/close@3x.png differ
diff --git a/example/ios/JVerificationResource.bundle/loginBtn_Dis@2x.png b/example/ios/JVerificationResource.bundle/loginBtn_Dis@2x.png
new file mode 100755
index 0000000..7c5d49b
Binary files /dev/null and b/example/ios/JVerificationResource.bundle/loginBtn_Dis@2x.png differ
diff --git a/example/ios/JVerificationResource.bundle/loginBtn_Dis@3x.png b/example/ios/JVerificationResource.bundle/loginBtn_Dis@3x.png
new file mode 100755
index 0000000..b845bba
Binary files /dev/null and b/example/ios/JVerificationResource.bundle/loginBtn_Dis@3x.png differ
diff --git a/example/ios/JVerificationResource.bundle/loginBtn_Hig@2x.png b/example/ios/JVerificationResource.bundle/loginBtn_Hig@2x.png
new file mode 100755
index 0000000..f2dff86
Binary files /dev/null and b/example/ios/JVerificationResource.bundle/loginBtn_Hig@2x.png differ
diff --git a/example/ios/JVerificationResource.bundle/loginBtn_Hig@3x.png b/example/ios/JVerificationResource.bundle/loginBtn_Hig@3x.png
new file mode 100755
index 0000000..8474654
Binary files /dev/null and b/example/ios/JVerificationResource.bundle/loginBtn_Hig@3x.png differ
diff --git a/example/ios/JVerificationResource.bundle/loginBtn_Nor@2x.png b/example/ios/JVerificationResource.bundle/loginBtn_Nor@2x.png
new file mode 100755
index 0000000..f2dff86
Binary files /dev/null and b/example/ios/JVerificationResource.bundle/loginBtn_Nor@2x.png differ
diff --git a/example/ios/JVerificationResource.bundle/loginBtn_Nor@3x.png b/example/ios/JVerificationResource.bundle/loginBtn_Nor@3x.png
new file mode 100755
index 0000000..8474654
Binary files /dev/null and b/example/ios/JVerificationResource.bundle/loginBtn_Nor@3x.png differ
diff --git a/example/ios/JVerificationResource.bundle/umcsdk_mobile_logo.png b/example/ios/JVerificationResource.bundle/umcsdk_mobile_logo.png
new file mode 100644
index 0000000..6a34b20
Binary files /dev/null and b/example/ios/JVerificationResource.bundle/umcsdk_mobile_logo.png differ
diff --git a/example/ios/example/JVerificationResource.bundle/checkBox_selected@2x.png b/example/ios/example/JVerificationResource.bundle/checkBox_selected@2x.png
new file mode 100755
index 0000000..f441148
Binary files /dev/null and b/example/ios/example/JVerificationResource.bundle/checkBox_selected@2x.png differ
diff --git a/example/ios/example/JVerificationResource.bundle/checkBox_selected@3x.png b/example/ios/example/JVerificationResource.bundle/checkBox_selected@3x.png
new file mode 100755
index 0000000..3f5d407
Binary files /dev/null and b/example/ios/example/JVerificationResource.bundle/checkBox_selected@3x.png differ
diff --git a/example/ios/example/JVerificationResource.bundle/checkBox_unSelected@2x.png b/example/ios/example/JVerificationResource.bundle/checkBox_unSelected@2x.png
new file mode 100755
index 0000000..e044d7c
Binary files /dev/null and b/example/ios/example/JVerificationResource.bundle/checkBox_unSelected@2x.png differ
diff --git a/example/ios/example/JVerificationResource.bundle/checkBox_unSelected@3x.png b/example/ios/example/JVerificationResource.bundle/checkBox_unSelected@3x.png
new file mode 100755
index 0000000..d8cf911
Binary files /dev/null and b/example/ios/example/JVerificationResource.bundle/checkBox_unSelected@3x.png differ
diff --git a/example/ios/example/JVerificationResource.bundle/loginBtn_Dis@2x.png b/example/ios/example/JVerificationResource.bundle/loginBtn_Dis@2x.png
new file mode 100755
index 0000000..7c5d49b
Binary files /dev/null and b/example/ios/example/JVerificationResource.bundle/loginBtn_Dis@2x.png differ
diff --git a/example/ios/example/JVerificationResource.bundle/loginBtn_Dis@3x.png b/example/ios/example/JVerificationResource.bundle/loginBtn_Dis@3x.png
new file mode 100755
index 0000000..b845bba
Binary files /dev/null and b/example/ios/example/JVerificationResource.bundle/loginBtn_Dis@3x.png differ
diff --git a/example/ios/example/JVerificationResource.bundle/loginBtn_Hig@2x.png b/example/ios/example/JVerificationResource.bundle/loginBtn_Hig@2x.png
new file mode 100755
index 0000000..f2dff86
Binary files /dev/null and b/example/ios/example/JVerificationResource.bundle/loginBtn_Hig@2x.png differ
diff --git a/example/ios/example/JVerificationResource.bundle/loginBtn_Hig@3x.png b/example/ios/example/JVerificationResource.bundle/loginBtn_Hig@3x.png
new file mode 100755
index 0000000..8474654
Binary files /dev/null and b/example/ios/example/JVerificationResource.bundle/loginBtn_Hig@3x.png differ
diff --git a/example/ios/example/JVerificationResource.bundle/loginBtn_Nor@2x.png b/example/ios/example/JVerificationResource.bundle/loginBtn_Nor@2x.png
new file mode 100755
index 0000000..f2dff86
Binary files /dev/null and b/example/ios/example/JVerificationResource.bundle/loginBtn_Nor@2x.png differ
diff --git a/example/ios/example/JVerificationResource.bundle/loginBtn_Nor@3x.png b/example/ios/example/JVerificationResource.bundle/loginBtn_Nor@3x.png
new file mode 100755
index 0000000..8474654
Binary files /dev/null and b/example/ios/example/JVerificationResource.bundle/loginBtn_Nor@3x.png differ
diff --git a/example/ios/example/JVerificationResource.bundle/umcsdk_mobile_logo.png b/example/ios/example/JVerificationResource.bundle/umcsdk_mobile_logo.png
new file mode 100644
index 0000000..6a34b20
Binary files /dev/null and b/example/ios/example/JVerificationResource.bundle/umcsdk_mobile_logo.png differ
diff --git a/example/package.json b/example/package.json
index 18c8eb4..b9e1c73 100644
--- a/example/package.json
+++ b/example/package.json
@@ -7,9 +7,9 @@
"test": "jest"
},
"dependencies": {
- "jcore-react-native": "^1.3.0",
+ "jcore-react-native": "^1.3.2",
"jverification-react-native": "file:..",
- "react": "16.6.0-alpha.8af6728",
+ "react": "^16.6.0-alpha.8af6728",
"react-native": "^0.57.4"
},
"devDependencies": {
diff --git a/index.js b/index.js
index 6f09ee4..3bf252a 100644
--- a/index.js
+++ b/index.js
@@ -7,18 +7,62 @@ import {
const JVerificationModule = NativeModules.JVerificationModule
export default class JVerification {
-
+
/**
* 初始化 JVerification SDK
- * @param {Object} params = {
+ * @param {Object} params = { android在build.gradle中配置
* appKey: String, // 极光官网注册的 appkey
* channel: String, // channel 发布渠道. 可选,默认为空
* advertisingId: String, // advertisingIdentifier 广告标识符(IDFA). 可选,默认为空
* isProduction: boolean // isProduction 是否生产环境. 如果为开发状态,设置为NO;如果为生产状态,应改为YES.可选,默认为NO
* }
*/
+
static init(params) {
- JVerificationModule.setup(params);
+ if(Platform.OS==="android"){
+ JVerificationModule.init();
+ }else{
+ JVerificationModule.setupWithConfig(params);
+ }
+ }
+
+ /**
+ * 请在SDK启动后调用本接口, 调用本接口可打开日志级别为: Debug, 打印调试日志.
+ * @param {boolean} enable
+ */
+ static setDebugEnable(enable) {
+ if(Platform.OS==="android"){
+ JVerificationModule.setDebugMode(enable);
+ }else{
+ JVerificationModule.setDebug(enable);
+ }
+ }
+
+ /**
+ * 判断网络环境是否支持
+ * @param {Function} callback = (result) => {
+ * result = {
+ * enable: boolean//true:支持,false:不支持
+ * }
+ * }
+ */
+ static checkVerifyEnable(callback){
+ JVerificationModule.checkVerifyEnable(callback);
+ }
+
+ /**
+ * Android 权限获取:"android.permission.READ_PHONE_STATE"
+ * @param {Function} callback = (result) => {
+ * result = {
+ * code: int,//0 获取成功,1 获取失败
+ * content: string
+ * }
+ * }
+ */
+ static requestPermission(callback) {
+ if (Platform.OS == "android") {
+ JVerificationModule.requestPermission(callback);
+ }
}
/**
@@ -27,6 +71,7 @@ export default class JVerification {
* result = {
* code: int,
* content: string
+ * operator:string
* }
* }
*/
@@ -43,7 +88,8 @@ export default class JVerification {
* @param {Function} callback = (result) => {
* result = {
* code: int,
- * content: string
+ * content: string,
+ * operator: string
* }
* }
*/
@@ -51,28 +97,71 @@ export default class JVerification {
JVerificationModule.verifyNumber(params, callback);
}
- /**
- * 请在SDK启动后调用本接口,调用本接口可打开日志级别为: Debug, 打印调试日志.
- * @param {boolean} enable
- */
- static setDebug(enable) {
- JVerificationModule.setDebug(enable);
- }
-
- /**
- * Android 权限获取:"android.permission.READ_PHONE_STATE"
+ /**
+ * 一键登录
* @param {Function} callback = (result) => {
* result = {
- * code: int,//0 获取成功,1 获取失败
- * content: string
+ * code: int,
+ * content: string,
+ * operator: string
* }
* }
*/
- static requestPermission(callback) {
- if (Platform.OS == "android") {
- JVerificationModule.requestPermission(callback);
+ static login(callback){
+ if(Platform.OS=="android"){
+ JVerificationModule.loginAuth(callback)
+ }else{
+ JVerificationModule.getAuthorizationWithController(callback)
+ }
+ }
+
+
+ /**
+ * 设置一键登录页面样式
+ * 均可选,需要在login前调用生效(ios需要将图片放入JVerificationResource.bundle)
+ * var config = {
+ * navColor:number, //导航栏颜色
+ * navText: string, //导航栏标题
+ * navTextColor:number, //导航栏标题文字颜色
+ * navReturnImage:string, //导航栏左侧返回按钮
+ *
+ * logoHidden:boolean, //logo是否隐藏
+ * logoImage:string, //logo(android默认为应用图标;ios默认无)
+ * logoWidth:number, //logo宽
+ * logoHeight:number, //logo高
+ * logoOffsetY:number, //logo相对导航栏向下偏移量
+ *
+ * numberColor:number, //手机号码文字颜色
+ * numOffsetY:number, //手机号码相对导航栏向下偏移量
+ *
+ * sloganTextColor:number, //slogan文字颜色
+ * sloganOffsetY:number, //slogan相对导航栏向下偏移量
+ *
+ * loginBtnText:string, //登录按钮文字
+ * loginBtnTextColor:number, //登录按钮文字颜色
+ * loginBtnImageStyle:string, //登录按钮selector选择样式 (仅android)
+ * loginBtnNormalImage:string, //登录按钮正常图片 (仅ios,三个同时设置生效)
+ * loginBtnUnableImage:string, //登录按钮失效图片 (仅ios,三个同时设置生效)
+ * loginBtnPressedImage:string, //登录按钮按下图片 (仅ios,三个同时设置生效)
+ * loginBtnOffsetY:number, //登录按钮相对导航栏向下偏移量
+ *
+ * privacyOneName:string, //隐私条款一
+ * privacyOneUrl:string, //隐私条款一链接
+ * privacyTwoName:string, //隐私条款二
+ * privacyTwoUrl:string, //隐私条款二链接
+ * privacyBasicColor:number, //隐私条款基础文字颜色
+ * privacyProtocolColor:number, //隐私条款文字颜色
+ * privacyCheckImage:string, //隐私条款复选框选中图片
+ * privacyUncheckImage:string, //隐私条款复选框未选中图片
+ * privacyOffsetY:number //隐私条款相对底部向上偏移量
+ * }
+ */
+ static setLoginUIConfig(parmas){
+ if(Platform.OS==="android"){
+ JVerificationModule.setCustomUIWithConfig(parmas)
+ }else{
+ JVerificationModule.customUIWithConfig(parmas)
}
}
-
-}
\ No newline at end of file
+}
diff --git a/ios/RCTJVerificationModule.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/RCTJVerificationModule.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..949b678
--- /dev/null
+++ b/ios/RCTJVerificationModule.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ BuildSystemType
+ Original
+
+
diff --git a/ios/RCTJVerificationModule/EAccountApiSDK.framework/EAccountApiSDK b/ios/RCTJVerificationModule/EAccountApiSDK.framework/EAccountApiSDK
new file mode 100755
index 0000000..e14225c
Binary files /dev/null and b/ios/RCTJVerificationModule/EAccountApiSDK.framework/EAccountApiSDK differ
diff --git a/ios/RCTJVerificationModule/EAccountApiSDK.framework/Headers/EAccountSDK.h b/ios/RCTJVerificationModule/EAccountApiSDK.framework/Headers/EAccountSDK.h
new file mode 100755
index 0000000..3c41239
--- /dev/null
+++ b/ios/RCTJVerificationModule/EAccountApiSDK.framework/Headers/EAccountSDK.h
@@ -0,0 +1,87 @@
+//
+// EAccountSDK.h
+// EAccountSDKNetwork
+//
+// Created by thy on 2018/6/23.
+// Copyright © 2018年 21CN. All rights reserved.
+//
+
+/**
+ V 1.5.1 修复已知的bug
+ */
+
+#import
+
+/**
+ 声明一个block
+ @param resultDic 网络返回的data的解析结果
+ */
+typedef void (^successHandler) ( NSDictionary * _Nonnull resultDic);
+
+/**
+ 声明一个block
+ @param error 网络返回的错误或者其它错误
+ */
+typedef void (^failureHandler) (NSError * _Nonnull error);
+
+@interface EAccountSDK : NSObject
+
+/**
+ 初始化SDK
+ @param appKey 接入方在账号平台领取的appKey
+ @param appSecrect 接入方在账号平台领取的appSecrect
+ */
++ (void)initWithSelfKey:(NSString * _Nonnull)appKey
+ appSecret:(NSString * _Nonnull)appSecrect;
+
+
+/**
+ 默认为正式环境的bundleID,需要使用测试环境的bundleId(通常是企业证书重签名改变的bundleId),请添加这个方法,在发布APP的时候请确保没有使用该方法。
+ */
+
++(void)setTestBundleId;
+
+/**
+ *@description 预登录接口
+ @param apiTimeoutInterval 接口超时时间,传0或者小于0的数,则默认为3s
+ */
+
++ (void)requestPreLogin:(NSTimeInterval)apiTimeoutInterval
+ completion:(nonnull successHandler)completion
+ failure:(nonnull failureHandler)fail;
+
+/**
+ *@description 登录接口
+ *@param accessCode 预取号获取d的accessCode
+ */
++ (void)requestLogin:(NSString * _Nonnull)accessCode
+ withTimeoutInterval:(NSTimeInterval)apiTimeoutInterval
+ completion:(nonnull successHandler)completion
+ failure:(nonnull failureHandler)fail;
+
+
+
+
+
+
+/**
+ *@description 预取号
+ @param apiTimeoutInterval 接口超时时间,传0或者小于0的数,则默认为3s
+ */
+
++ (void)getMobileCodeWithTimeout:(NSTimeInterval)apiTimeoutInterval
+ completion:(nonnull successHandler)completion
+ failure:(nonnull failureHandler)fail DEPRECATED_MSG_ATTRIBUTE("Method deprecated. Use `requestPreLogin:completion:failure:`");
+
+/**
+ *@description 网络认证
+ *@param accessCode 预取号获取d的accessCode
+ */
++ (void)gatewayAuthWithAccessCode:(NSString * _Nonnull)accessCode
+ withTimeoutInterval:(NSTimeInterval)apiTimeoutInterval
+ completion:(nonnull successHandler)completion
+ failure:(nonnull failureHandler)fail DEPRECATED_MSG_ATTRIBUTE("Method deprecated. Use `requestLogin:completion:failure:`");
+
+
+
+@end
diff --git a/ios/RCTJVerificationModule/EAccountApiSDK.framework/Info.plist b/ios/RCTJVerificationModule/EAccountApiSDK.framework/Info.plist
new file mode 100755
index 0000000..02d6835
Binary files /dev/null and b/ios/RCTJVerificationModule/EAccountApiSDK.framework/Info.plist differ
diff --git a/ios/RCTJVerificationModule/JVERIFICATIONService.h b/ios/RCTJVerificationModule/JVERIFICATIONService.h
index c23da7a..c5d1987 100755
--- a/ios/RCTJVerificationModule/JVERIFICATIONService.h
+++ b/ios/RCTJVerificationModule/JVERIFICATIONService.h
@@ -7,8 +7,110 @@
//
#import
+#import
+
+#define JVER_VERSION_NUMBER 2.1.1
+
+@interface JVUIConfig : NSObject
+
+/**
+ 授权页面的各个控件的Y轴默认值都是以375*667屏幕为基准 系数 : 当前屏幕高度/667
+ 1、当设置Y轴并有效时 偏移量OffsetY属于相对导航栏的绝对Y值
+ 2、(负数且超出当前屏幕无效)为保证各个屏幕适配,请自行设置好Y轴在屏幕上的比例(推荐:当前屏幕高度/667)
+ */
+
+/*----------------------------------------授权页面-----------------------------------*/
+
+//MARK:导航栏*************
+
+/**导航栏颜色*/
+@property (nonatomic,strong) UIColor *navColor;
+/**状态栏着色样式*/
+@property (nonatomic,assign) UIBarStyle barStyle;
+/**导航栏标题*/
+@property (nonatomic,strong) NSAttributedString *navText;
+/**导航返回图标*/
+@property (nonatomic,strong) UIImage *navReturnImg;
+/**导航栏右侧自定义控件*/
+@property (nonatomic,strong) UIBarButtonItem *navControl;
+
+//MARK:图片设置************
+
+/**LOGO图片*/
+@property (nonatomic,strong) UIImage *logoImg;
+/**LOGO图片宽度*/
+@property (nonatomic,assign) CGFloat logoWidth;
+/**LOGO图片高度*/
+@property (nonatomic,assign) CGFloat logoHeight;
+/**LOGO图片偏移量*/
+@property (nonatomic,assign) CGFloat logoOffsetY;
+/**LOGO图片隐藏*/
+@property (nonatomic,assign) BOOL logoHidden;
+
+//MARK:登录按钮************
+
+/**登录按钮文本*/
+@property (nonatomic,strong) NSString *logBtnText;
+/**登录按钮Y偏移量*/
+@property (nonatomic,assign) CGFloat logBtnOffsetY;
+/**登录按钮文本颜色*/
+@property (nonatomic,strong) UIColor *logBtnTextColor;
+/**登录按钮背景图片添加到数组(顺序如下)
+ @[激活状态的图片,失效状态的图片,高亮状态的图片]
+ */
+@property (nonatomic,strong) NSArray *logBtnImgs;
+
+//MARK:号码框设置************
+
+/**手机号码字体颜色*/
+@property (nonatomic,strong) UIColor *numberColor;
+/**号码栏Y偏移量*/
+@property (nonatomic,assign) CGFloat numFieldOffsetY;
+
+//MARK:隐私条款************
+
+/**复选框未选中时图片*/
+@property (nonatomic,strong) UIImage *uncheckedImg;
+/**复选框选中时图片*/
+@property (nonatomic,strong) UIImage *checkedImg;
+/**隐私条款一:数组(务必按顺序)
+ @[条款名称,条款链接]
+ */
+@property (nonatomic,strong) NSArray *appPrivacyOne;
+/**隐私条款二:数组(务必按顺序)
+ @[条款名称,条款链接]
+ */
+@property (nonatomic,strong) NSArray *appPrivacyTwo;
+/**隐私条款名称颜色
+ @[基础文字颜色,条款颜色]
+ */
+@property (nonatomic,strong) NSArray *appPrivacyColor;
+/**隐私条款Y偏移量(注:此属性为与屏幕底部的距离)*/
+@property (nonatomic,assign) CGFloat privacyOffsetY;
+
+//MARK:slogan************
+
+/**slogan偏移量Y*/
+@property (nonatomic,assign) CGFloat sloganOffsetY;
+/**slogan文字颜色*/
+@property (nonatomic,strong) UIColor *sloganTextColor;
+
+
+@end
+
+
+@interface JVMobileUIConfig : JVUIConfig
+@end
+
+
+@interface JVUnicomUIConfig : JVUIConfig
+@end
+
+@interface JVTelecomUIConfig : JVUIConfig
+@end
+
+
-#define JVER_VERSION_NUMBER 1.1.2
@interface JVAuthConfig : NSObject
@@ -51,6 +153,13 @@
*/
+ (void)verifyNumber:(JVAuthEntity *)entity result:(void (^)(NSDictionary *result))completion;
+/**
+ 授权登录
+ @param vc 当前控制器
+ @param completion 认证结果
+ */
++ (void)getAuthorizationWithController:(UIViewController *)vc completion:(void (^)(NSDictionary *result))completion;
+
/*!
* @abstract 设置是否打印sdk产生的Debug级log信息, 默认为NO(不打印log)
*
@@ -67,4 +176,21 @@
*/
+ (BOOL)checkVerifyEnable;
+
+/**
+ 自定义登录页UI样式参数
+ @param UIConfig 自定义UI设置
+ */
++ (void)customUIWithConfig:(JVUIConfig *)UIConfig;
+
+/**
+ 自定义登录页UI样式参数
+ @param UIConfig JVUIConfig的子类
+ @param customViewsBlk 添加自定义视图block
+*/
++ (void)customUIWithConfig:(JVUIConfig *)UIConfig customViews:(void(^)(UIView *customAreaView))customViewsBlk;
+
@end
+
+
+
diff --git a/ios/RCTJVerificationModule/RCTJVerificationModule.m b/ios/RCTJVerificationModule/RCTJVerificationModule.m
index dc93210..f11cd04 100644
--- a/ios/RCTJVerificationModule/RCTJVerificationModule.m
+++ b/ios/RCTJVerificationModule/RCTJVerificationModule.m
@@ -24,6 +24,8 @@
#import "JVERIFICATIONService.h"
+#define UIColorFromRGBValue(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
+
@implementation RCTJVerificationModule
RCT_EXPORT_MODULE();
@@ -43,7 +45,11 @@ - (id)init {
return self;
}
-RCT_EXPORT_METHOD(setup: (NSDictionary *)params) {
+RCT_EXPORT_METHOD(setDebug: (nonnull NSNumber *)enable) {
+ [JVERIFICATIONService setDebug: [enable boolValue]];
+}
+
+RCT_EXPORT_METHOD(setupWithConfig: (NSDictionary *)params) {
JVAuthConfig *config = [[JVAuthConfig alloc] init];
if (params[@"appKey"]) {
config.appKey = params[@"appKey"];
@@ -68,11 +74,17 @@ - (id)init {
[JVERIFICATIONService setupWithConfig:config];
}
+RCT_EXPORT_METHOD(checkVerifyEnable:(RCTResponseSenderBlock)callback){
+ BOOL success = [JVERIFICATIONService checkVerifyEnable];
+ if (callback) {
+ callback(@[@{@"enable":@(success)}]);
+ }
+}
RCT_EXPORT_METHOD(getToken: (RCTResponseSenderBlock)callback) {
[JVERIFICATIONService getToken:^(NSDictionary *result) {
- callback(@[result]);
+ [self doResult:result callback:callback];
}];
}
@@ -89,12 +101,292 @@ - (id)init {
}
[JVERIFICATIONService verifyNumber:entity result:^(NSDictionary *result) {
- callback(@[result]);
+ [self doResult:result callback:callback];
}];
}
-RCT_EXPORT_METHOD(setDebug: (nonnull NSNumber *)enable) {
- [JVERIFICATIONService setDebug: [enable boolValue]];
+RCT_EXPORT_METHOD(customUIWithConfig: (NSDictionary *)params) {
+ //移动
+ JVMobileUIConfig *mobileUIConfig = [[JVMobileUIConfig alloc] init];
+ //联通
+ JVUnicomUIConfig *unicomUIConfig = [[JVUnicomUIConfig alloc] init];
+ //电信
+ JVTelecomUIConfig *telecomUIConfig = [[JVTelecomUIConfig alloc] init];
+
+
+ mobileUIConfig.barStyle = 0;
+ unicomUIConfig.barStyle = 0;
+ telecomUIConfig.barStyle = 0;
+
+ if(params[@"navColor"]){
+ NSNumber *color = params[@"navColor"];
+ UIColor *navColor = UIColorFromRGBValue(color.integerValue);
+ mobileUIConfig.navColor = navColor;
+ unicomUIConfig.navColor = navColor;
+ telecomUIConfig.navColor = navColor;
+ }
+
+ NSString *navTextString = @"登录";
+ if(params[@"navText"]){
+ navTextString = params[@"navText"];
+ }
+ UIColor *navTextColor = UIColorFromRGBValue(-1);
+ if(params[@"navTextColor"]){
+ NSNumber *color = params[@"navTextColor"];
+ navTextColor = UIColorFromRGBValue([color intValue]);
+ }
+ NSDictionary *navTextAttr = @{NSForegroundColorAttributeName:navTextColor};
+ NSAttributedString *attr = [[NSAttributedString alloc]initWithString:navTextString attributes:navTextAttr];
+ mobileUIConfig.navText = attr;
+ unicomUIConfig.navText = attr;
+ telecomUIConfig.navText = attr;
+
+ if(params[@"navReturnImage"]){
+ NSString *str = params[@"navReturnImage"];
+ NSString *bundlePath = [[NSBundle mainBundle] pathForResource:@"JVerificationResource" ofType:@"bundle"];
+ NSString *imageName = [NSString stringWithFormat:@"%@.png",str];
+ NSString *imagePath = [bundlePath stringByAppendingPathComponent:imageName];
+ UIImage *navReturnImage= [UIImage imageWithContentsOfFile:imagePath];
+ mobileUIConfig.navReturnImg = navReturnImage;
+ unicomUIConfig.navReturnImg = navReturnImage;
+ telecomUIConfig.navReturnImg = navReturnImage;
+ }
+
+ if(params[@"logoHidden"]){
+ BOOL hide =[params[@"logoHidden"] boolValue];
+ mobileUIConfig.logoHidden = hide;
+ unicomUIConfig.logoHidden = hide;
+ telecomUIConfig.logoHidden = hide;
+ }
+
+ if(params[@"logoWidth"]){
+ NSNumber *width = params[@"logoWidth"];
+ CGFloat _logoWidth = [width floatValue];
+ mobileUIConfig.logoWidth = _logoWidth;
+ unicomUIConfig.logoWidth = _logoWidth;
+ telecomUIConfig.logoWidth = _logoWidth;
+ }
+
+ if(params[@"logoHeight"]){
+ NSNumber *height = params[@"logoHeight"];
+ CGFloat _logoHeight= [height floatValue];
+ mobileUIConfig.logoWidth = _logoHeight;
+ unicomUIConfig.logoWidth = _logoHeight;
+ telecomUIConfig.logoWidth = _logoHeight;
+ }
+
+ if(params[@"logoImage"]){
+ NSString *str = params[@"logoImage"];
+ NSString *bundlePath = [[NSBundle mainBundle] pathForResource:@"JVerificationResource" ofType:@"bundle"];
+ NSString *imageName = [NSString stringWithFormat:@"%@.png",str];
+ NSString *imagePath = [bundlePath stringByAppendingPathComponent:imageName];
+ UIImage *logoImage= [UIImage imageWithContentsOfFile:imagePath];
+ mobileUIConfig.logoImg = logoImage;
+ unicomUIConfig.logoImg = logoImage;
+ telecomUIConfig.logoImg = logoImage;
+ }
+
+ if(params[@"logoOffsetY"]){
+ NSNumber *offset = params[@"logoOffsetY"];
+ CGFloat _logoOffsetY= [offset floatValue];
+ mobileUIConfig.logoOffsetY = _logoOffsetY;
+ unicomUIConfig.logoOffsetY = _logoOffsetY;
+ telecomUIConfig.logoOffsetY = _logoOffsetY;
+ }
+
+ if(params[@"numColor"]){
+ NSNumber *color = params[@"navColor"];
+ UIColor *numberColor = UIColorFromRGBValue([color intValue]);
+ mobileUIConfig.numberColor = numberColor;
+ unicomUIConfig.numberColor = numberColor;
+ telecomUIConfig.numberColor = numberColor;
+ }
+
+ if(params[@"numOffsetY"]){
+ NSNumber *offset = params[@"numOffsetY"];
+ CGFloat _numOffsetY= [offset floatValue];
+ mobileUIConfig.numFieldOffsetY = _numOffsetY;
+ unicomUIConfig.numFieldOffsetY = _numOffsetY;
+ telecomUIConfig.numFieldOffsetY = _numOffsetY;
+ }
+
+ if(params[@"sloganTextColor"]){
+ NSNumber *color = params[@"sloganTextColor"];
+ UIColor *sloganTextColor = UIColorFromRGBValue([color intValue]);
+ mobileUIConfig.sloganTextColor = sloganTextColor;
+ unicomUIConfig.sloganTextColor = sloganTextColor;
+ telecomUIConfig.sloganTextColor = sloganTextColor;
+ }
+
+ if(params[@"sloganOffsetY"]){
+ NSNumber *offset = params[@"sloganOffsetY"];
+ CGFloat _sloganOffsetY= [offset floatValue];
+ mobileUIConfig.sloganOffsetY = _sloganOffsetY;
+ unicomUIConfig.sloganOffsetY = _sloganOffsetY;
+ telecomUIConfig.sloganOffsetY = _sloganOffsetY;
+ }
+
+ if(params[@"loginBtnText"]){
+ NSString *str = params[@"loginBtnText"];
+ mobileUIConfig.logBtnText = str;
+ unicomUIConfig.logBtnText = str;
+ telecomUIConfig.logBtnText = str;
+ }
+
+ if(params[@"loginBtnTextColor"]){
+ NSNumber *color = params[@"loginBtnTextColor"];
+ UIColor *loginBtnTextColor = UIColorFromRGBValue([color intValue]);
+ mobileUIConfig.logBtnTextColor = loginBtnTextColor;
+ unicomUIConfig.logBtnTextColor = loginBtnTextColor;
+ telecomUIConfig.logBtnTextColor = loginBtnTextColor;
+ }
+
+ NSString *normalImageStr = nil;
+ if(params[@"loginBtnNormalImage"]){
+ normalImageStr = params[@"loginBtnNormalImage"];
+ }
+ NSString *pressedlImageStr = nil;
+ if(params[@"loginBtnPressedImage"]){
+ pressedlImageStr = params[@"loginBtnPressedImage"];
+ }
+ NSString *unableImageStr = nil;
+ if(params[@"loginBtnUnableImage"]){
+ unableImageStr = params[@"loginBtnUnableImage"];
+ }
+
+ NSString *bundlePath = [[NSBundle mainBundle] pathForResource:@"JVerificationResource" ofType:@"bundle"];
+ UIImage *loginBtnNormalImage= [UIImage imageWithContentsOfFile:[bundlePath stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.png",normalImageStr]]];
+ UIImage *loginBtnPressedImage= [UIImage imageWithContentsOfFile:[bundlePath stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.png",pressedlImageStr]]];
+ UIImage *loginBtnUnableImage= [UIImage imageWithContentsOfFile:[bundlePath stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.png",unableImageStr]]];
+
+ NSArray * images =[[NSArray alloc]initWithObjects:loginBtnNormalImage,loginBtnUnableImage,loginBtnPressedImage,nil];
+ mobileUIConfig.logBtnImgs = images;
+ unicomUIConfig.logBtnImgs = images;
+ telecomUIConfig.logBtnImgs = images;
+
+
+ if(params[@"loginBtnOffsetY"]){
+ NSNumber *offset = params[@"loginBtnOffsetY"];
+ CGFloat _loginBtnOffsetY= [offset floatValue];
+ mobileUIConfig.logBtnOffsetY = _loginBtnOffsetY;
+ unicomUIConfig.logBtnOffsetY = _loginBtnOffsetY;
+ telecomUIConfig.logBtnOffsetY = _loginBtnOffsetY;
+ }
+
+ NSString *privacyOneName = @"应用自定义服务条款1";
+ if(params[@"privacyOneName"]){
+ privacyOneName = params[@"privacyOneName"];
+ }
+ NSString *privacyOneUrl = @"https://www.jiguang.cn/about";
+ if(params[@"privacyOneUrl"]){
+ privacyOneUrl = params[@"privacyOneUrl"];
+ }
+ mobileUIConfig.appPrivacyOne = @[privacyOneName,privacyOneUrl];
+ unicomUIConfig.appPrivacyOne = @[privacyOneName,privacyOneUrl];
+ telecomUIConfig.appPrivacyOne = @[privacyOneName,privacyOneUrl];
+
+ NSString *privacyTwoName = @"应用自定义服务条款2";
+ if(params[@"privacyTwoName"]){
+ privacyTwoName = params[@"privacyTwoName"];
+ }
+ NSString *privacyTwoUrl = @"https://www.jiguang.cn/about";
+ if(params[@"privacyTwoUrl"]){
+ privacyOneUrl = params[@"privacyTwoUrl"];
+ }
+ mobileUIConfig.appPrivacyTwo = @[privacyTwoName,privacyTwoUrl];
+ unicomUIConfig.appPrivacyTwo = @[privacyTwoName,privacyTwoUrl];
+ telecomUIConfig.appPrivacyTwo = @[privacyTwoName,privacyTwoUrl];
+
+ UIColor *privacyBasicColor = [UIColor grayColor];
+ if(params[@"privacyBasicColor"]){
+ NSNumber *color = params[@"privacyBasicColor"];
+ privacyBasicColor = UIColorFromRGBValue([color intValue]);
+ }
+ UIColor *privacyProtocolColor = [UIColor blackColor];
+ if(params[@"privacyProtocolColor"]){
+ NSNumber *color = params[@"privacyProtocolColor"];
+ privacyProtocolColor = UIColorFromRGBValue([color intValue]);
+ }
+ mobileUIConfig.appPrivacyColor = @[privacyBasicColor,privacyProtocolColor];
+ unicomUIConfig.appPrivacyColor = @[privacyBasicColor,privacyProtocolColor];
+ telecomUIConfig.appPrivacyColor = @[privacyBasicColor,privacyProtocolColor];
+
+ if(params[@"privacyCheckImage"]){
+ NSString *str = params[@"privacyCheckImage"];
+ NSString *bundlePath = [[NSBundle mainBundle] pathForResource:@"JVerificationResource" ofType:@"bundle"];
+ NSString *imageName = [NSString stringWithFormat:@"%@.png",str];
+ NSString *imagePath = [bundlePath stringByAppendingPathComponent:imageName];
+ UIImage *privacyCheckImage= [UIImage imageWithContentsOfFile:imagePath];
+
+ mobileUIConfig.checkedImg = privacyCheckImage;
+ unicomUIConfig.checkedImg = privacyCheckImage;
+ telecomUIConfig.checkedImg = privacyCheckImage;
+ }
+
+ if(params[@"privacyUncheckImage"]){
+ NSString *str = params[@"privacyUncheckImage"];
+ NSString *bundlePath = [[NSBundle mainBundle] pathForResource:@"JVerificationResource" ofType:@"bundle"];
+ NSString *imageName = [NSString stringWithFormat:@"%@.png",str];
+ NSString *imagePath = [bundlePath stringByAppendingPathComponent:imageName];
+ UIImage *privacyUncheckImage= [UIImage imageWithContentsOfFile:imagePath];
+
+ mobileUIConfig.uncheckedImg = privacyUncheckImage;
+ unicomUIConfig.uncheckedImg = privacyUncheckImage;
+ telecomUIConfig.uncheckedImg = privacyUncheckImage;
+ }
+
+ if(params[@"privacyOffsetY"]){
+ NSNumber *offset = params[@"privacyOffsetY"];
+ CGFloat _privacyOffsetY= [offset floatValue];
+ mobileUIConfig.privacyOffsetY = _privacyOffsetY;
+ unicomUIConfig.privacyOffsetY = _privacyOffsetY;
+ telecomUIConfig.privacyOffsetY = _privacyOffsetY;
+ }
+
+ [JVERIFICATIONService customUIWithConfig:mobileUIConfig customViews:^(UIView *customAreaView) {}];
+ [JVERIFICATIONService customUIWithConfig:unicomUIConfig customViews:^(UIView *customAreaView) {}];
+ [JVERIFICATIONService customUIWithConfig:telecomUIConfig customViews:^(UIView *customAreaView) {}];
+}
+
+RCT_EXPORT_METHOD(getAuthorizationWithController: (RCTResponseSenderBlock)callback) {
+ dispatch_async(dispatch_get_main_queue(), ^{
+ UIViewController *vc =[self getPresentedViewController];
+ [JVERIFICATIONService getAuthorizationWithController:vc completion:^(NSDictionary *result) {
+ //callback(@[result]);
+ [self doResult:result callback:callback];
+ }];
+ });
}
+- (UIViewController *)getPresentedViewController{
+ UIViewController *appRootVC = [UIApplication sharedApplication].keyWindow.rootViewController;
+ UIViewController *topVC = appRootVC;
+ if (topVC.presentedViewController) {
+ topVC = topVC.presentedViewController;
+ }
+ return topVC;
+}
+
+-(void)doResult:(NSDictionary *)result callback:(RCTResponseSenderBlock)callback{
+ NSInteger code = -9999;
+ NSString *content = nil;
+ NSString *operator = nil;
+ if(result[@"code"]){
+ code = [result[@"code"] integerValue];
+ }
+ if(result[@"token"]){
+ content = result[@"token"];
+ }
+ if(result[@"content"]){
+ content = result[@"content"];
+ }
+ if(result[@"operator"]){
+ operator = result[@"operator"];
+ }
+ callback(@[@{@"code":@(code),@"content":content?:@"",@"operator":operator?:@""}]);
+}
+
+
+
+
@end
diff --git a/ios/RCTJVerificationModule/TYRZNoUISDK.framework/Headers/TYRZLogin.h b/ios/RCTJVerificationModule/TYRZNoUISDK.framework/Headers/TYRZLogin.h
deleted file mode 100755
index 66a4023..0000000
--- a/ios/RCTJVerificationModule/TYRZNoUISDK.framework/Headers/TYRZLogin.h
+++ /dev/null
@@ -1,30 +0,0 @@
-//
-// TYRZLogin.h
-// TYRZ
-//
-// Created by 林涛 on 2017/4/24.
-// Copyright © 2017年 林涛. All rights reserved.
-//
-
-#import
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface TYRZLogin : NSObject
-
-+ (nullable instancetype)loginWithAppId:(NSString *)appid appKey:(NSString *)appkey;
-
-/**
- 本机号码校验获取token
- @param duration 请求时间(毫秒)
- @param complete 回调
- */
-- (void)requestTokenWithTimeout:(NSTimeInterval)duration Complete:(void(^)(NSDictionary *))complete;
-
-//返回SDK版本号
-+ (NSString *)sdkVersion;
-
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/ios/RCTJVerificationModule/TYRZNoUISDK.framework/TYRZNoUISDK b/ios/RCTJVerificationModule/TYRZNoUISDK.framework/TYRZNoUISDK
deleted file mode 100755
index f3afa88..0000000
Binary files a/ios/RCTJVerificationModule/TYRZNoUISDK.framework/TYRZNoUISDK and /dev/null differ
diff --git a/ios/RCTJVerificationModule/TYRZNoUISDK.framework/info.plist b/ios/RCTJVerificationModule/TYRZNoUISDK.framework/info.plist
deleted file mode 100755
index 1492fdb..0000000
Binary files a/ios/RCTJVerificationModule/TYRZNoUISDK.framework/info.plist and /dev/null differ
diff --git a/ios/RCTJVerificationModule/TYRZSDK.framework/Headers/TYRZSDK.h b/ios/RCTJVerificationModule/TYRZSDK.framework/Headers/TYRZSDK.h
new file mode 100755
index 0000000..094b586
--- /dev/null
+++ b/ios/RCTJVerificationModule/TYRZSDK.framework/Headers/TYRZSDK.h
@@ -0,0 +1,16 @@
+//
+// TYRZSDK.h
+// TYRZSDK
+//
+// Created by 林涛 on 2017/6/27.
+// Copyright © 2017年 林涛. All rights reserved.
+//
+
+#ifndef TYRZSDK_h
+#define TYRZSDK_h
+
+
+#import "TYRZUILogin.h"
+
+
+#endif /* TYRZSDK_h */
diff --git a/ios/RCTJVerificationModule/TYRZSDK.framework/Headers/TYRZUILogin.h b/ios/RCTJVerificationModule/TYRZSDK.framework/Headers/TYRZUILogin.h
new file mode 100755
index 0000000..3a1a1cf
--- /dev/null
+++ b/ios/RCTJVerificationModule/TYRZSDK.framework/Headers/TYRZUILogin.h
@@ -0,0 +1,87 @@
+//
+// TYRZUILogin.h
+// TYRZ
+//
+// Created by 林涛 on 2017/6/21.
+// Copyright © 2017年 林涛. All rights reserved.
+//
+
+#import
+#import "UACustomModel.h"
+
+@interface TYRZUILogin : NSObject
+
+/**
+ SDK版本号
+ */
+@property (nonatomic,class,readonly) NSString *sdkVersion;
+
+/**
+ 网络类型及运营商
+ 网络类型 key:networkType value:0.无网络/ 1.数据流量 / 2.wifi / 3.数据+wifi
+ 运营商 key:operatorType value:0.未知 / 1.中国移动 / 2.中国联通 / 3.中国电信
+ */
+@property (nonatomic,class,readonly) NSDictionary *networkType;
+
+/**
+ 初始化SDK参数
+ @param appId 申请能力平台成功后,分配给网站的appId
+ @param appKey 申请能力平台成功后,分配给网站的appKey
+ */
++ (void)initializeWithAppId:(NSString *)appId appKey:(NSString *)appKey;
+
+/**
+ 控制台日志输出控制(默认关闭)
+ @param enable 开关参数
+ */
++ (void)printConsoleEnable:(BOOL)enable;
+
+/**
+ 自定义UI样式参数
+ @param viewModel UI实例Model(UACustomModel.h可查看属性)
+ @param customViews 自定义视图
+ */
++ (void)customUIWithParams:(UACustomModel *)viewModel
+ customViews:(void(^)(UIView *customAreaView))customViews;
+
+/**
+ 自定义短信验证码开关
+ @param flag 开关标记
+ */
++ (void)enableCustomSMS:(BOOL)flag;
+
+
+/**
+ 预取号
+ @param timeout 超时时间(毫秒)
+ @param complete 回调
+ */
++ (void)getPhonenumberWithTimeout:(NSTimeInterval)timeout
+ completion:(void(^)(id sender))complete;
+
+
+/**
+ 授权登录
+ @param vc 当前控制器
+ @param timeout 超时时间(毫秒)
+ @param complete 回调
+ */
++ (void)getAuthorizationWithController:(UIViewController *)vc
+ timeout:(NSTimeInterval)timeout
+ complete:(void (^)(id sender))complete;
+
+/**
+ 本机号码校验
+ @param timeout 超时时间(毫秒)
+ @param complete 回调
+ */
++ (void)mobileAuthWithTimeout:(NSTimeInterval)timeout
+ complete:(void (^)(id sender))complete;
+
+/**
+ 删除内存中的缓存
+ */
+
++(BOOL)delectScrip;
+
+@end
diff --git a/ios/RCTJVerificationModule/TYRZSDK.framework/Headers/UACustomModel.h b/ios/RCTJVerificationModule/TYRZSDK.framework/Headers/UACustomModel.h
new file mode 100755
index 0000000..a3c1ccc
--- /dev/null
+++ b/ios/RCTJVerificationModule/TYRZSDK.framework/Headers/UACustomModel.h
@@ -0,0 +1,117 @@
+//
+// UACustomModel.h
+// Test
+//
+// Created by issuser on 2018/5/18.
+// Copyright © 2018年 林涛. All rights reserved.
+//
+
+#import
+
+@interface UACustomModel : NSObject
+
+/**
+ SDK5.3.8版本注意事项:
+ 授权页面的各个控件的Y轴默认值都是以375*667屏幕为基准 系数 : 当前屏幕高度/667
+ 1、当设置Y轴并有效时 偏移量OffsetY属于相对导航栏的绝对Y值
+ 2、(负数且超出当前屏幕无效)为保证各个屏幕适配,请自行设置好Y轴在屏幕上的比例(推荐:当前屏幕高度/667)
+ */
+
+/*----------------------------------------授权页面-----------------------------------*/
+
+//MARK:导航栏*************
+
+/**导航栏颜色*/
+@property (nonatomic,strong) UIColor *navColor;
+/**状态栏着色样式*/
+@property (nonatomic,assign) UIBarStyle barStyle;
+/**导航栏标题*/
+@property (nonatomic,strong) NSAttributedString *navText;
+/**导航返回图标*/
+@property (nonatomic,strong) UIImage *navReturnImg;
+/**导航栏右侧自定义控件*/
+@property (nonatomic,strong) UIBarButtonItem *navControl;
+
+//MARK:图片设置************
+
+/**LOGO图片*/
+@property (nonatomic,strong) UIImage *logoImg;
+/**LOGO图片宽度*/
+@property (nonatomic,assign) CGFloat logoWidth;
+/**LOGO图片高度*/
+@property (nonatomic,assign) CGFloat logoHeight;
+/**LOGO图片偏移量*/
+@property (nonatomic,assign) CGFloat logoOffsetY;
+/**LOGO图片隐藏*/
+@property (nonatomic,assign) BOOL logoHidden;
+
+//MARK:登录按钮************
+
+/**登录按钮文本*/
+@property (nonatomic,strong) NSString *logBtnText;
+/**登录按钮Y偏移量*/
+@property (nonatomic,assign) CGFloat logBtnOffsetY;
+/**登录按钮文本颜色*/
+@property (nonatomic,strong) UIColor *logBtnTextColor;
+/**登录按钮背景图片添加到数组(顺序如下)
+ @[激活状态的图片,失效状态的图片,高亮状态的图片]
+*/
+@property (nonatomic,strong) NSArray *logBtnImgs;
+
+//MARK:号码框设置************
+
+/**显示旧版号码栏样式*/
+@property (nonatomic,assign) BOOL oldStyle;
+/**手机号码字体颜色*/
+@property (nonatomic,strong) UIColor *numberColor;
+/**隐藏切换账号按钮*/
+@property (nonatomic,assign) BOOL swithAccHidden;
+/**切换账号字体颜色*/
+@property (nonatomic,strong) UIColor *swithAccTextColor;
+/**设置切换账号相对于标题栏下边缘y偏移*/
+@property (nonatomic,assign) CGFloat switchOffsetY;
+/**号码栏Y偏移量*/
+@property (nonatomic,assign) CGFloat numFieldOffsetY;
+
+//MARK:隐私条款************
+
+/**复选框未选中时图片*/
+@property (nonatomic,strong) UIImage *uncheckedImg;
+/**复选框选中时图片*/
+@property (nonatomic,strong) UIImage *checkedImg;
+/**隐私条款一:数组(务必按顺序)
+ @[条款名称,条款链接]
+ */
+@property (nonatomic,strong) NSArray *appPrivacyOne;
+/**隐私条款二:数组(务必按顺序)
+ @[条款名称,条款链接]
+ */
+@property (nonatomic,strong) NSArray *appPrivacyTow;
+/**隐私条款名称颜色
+ @[基础文字颜色,条款颜色]
+ */
+@property (nonatomic,strong) NSArray *appPrivacyColor;
+/**隐私条款Y偏移量(注:此属性为与屏幕底部的距离)*/
+@property (nonatomic,assign) CGFloat privacyOffsetY;
+
+//MARK:底部标识Title************
+
+/**slogan偏移量Y*/
+@property (nonatomic,assign) CGFloat sloganOffsetY;
+/**slogan文字颜色*/
+@property (nonatomic,strong) UIColor *sloganTextColor;
+
+/*----------------------------------------短信页面-----------------------------------*/
+/**短验页面导航栏标题*/
+@property (nonatomic,strong) NSAttributedString *SMSNavText;
+/**登录按钮文本内容*/
+@property (nonatomic,strong) NSString *SMSLogBtnText;
+/**登录按钮文本颜色*/
+@property (nonatomic,strong) UIColor *SMSLogBtnTextColor;
+/**短验登录按钮图片请按顺序添加到数组(顺序如下)
+ @[激活状态的图片,失效状态的图片,高亮状态的图片]
+
+ */
+@property (nonatomic,strong) NSArray *SMSLogBtnImgs;
+
+@end
diff --git a/ios/RCTJVerificationModule/TYRZSDK.framework/Info.plist b/ios/RCTJVerificationModule/TYRZSDK.framework/Info.plist
new file mode 100755
index 0000000..009c5a8
Binary files /dev/null and b/ios/RCTJVerificationModule/TYRZSDK.framework/Info.plist differ
diff --git a/ios/RCTJVerificationModule/TYRZSDK.framework/Modules/module.modulemap b/ios/RCTJVerificationModule/TYRZSDK.framework/Modules/module.modulemap
new file mode 100755
index 0000000..8d89791
--- /dev/null
+++ b/ios/RCTJVerificationModule/TYRZSDK.framework/Modules/module.modulemap
@@ -0,0 +1,6 @@
+framework module TYRZSDK {
+ umbrella header "TYRZSDK.h"
+
+ export *
+ module * { export * }
+}
diff --git a/ios/RCTJVerificationModule/TYRZSDK.framework/TYRZSDK b/ios/RCTJVerificationModule/TYRZSDK.framework/TYRZSDK
new file mode 100755
index 0000000..ab3fbfc
Binary files /dev/null and b/ios/RCTJVerificationModule/TYRZSDK.framework/TYRZSDK differ
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
new file mode 100755
index 0000000..72c1ff5
--- /dev/null
+++ b/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/Headers/UniAuthHelper.h
@@ -0,0 +1,23 @@
+//
+// UniAuthHelper.h
+// account_verify_sdk_core
+//
+// Created by zhuof on 2018/3/8.
+// Copyright © 2018年 xiaowo. All rights reserved.
+//
+
+#import
+#import "UniResultListener.h"
+//#import
+
+@interface UniAuthHelper : NSObject
+
++(UniAuthHelper *) getInstance;
+
+-(void) getAccessCode :(NSString*) appId appSecret:(NSString*) appSecret listener:(UniResultListener) listener;
+
+-(void) getAccessToken : (NSString *) accessCode listener:(UniResultListener) listener;
+
+-(void) login :(NSString*) appId appSecret:(NSString*) appSecret listener:(UniResultListener) listener;
+
+@end
diff --git a/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/Headers/UniResultListener.h b/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/Headers/UniResultListener.h
new file mode 100755
index 0000000..6bec923
--- /dev/null
+++ b/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/Headers/UniResultListener.h
@@ -0,0 +1,11 @@
+//
+// UniResultListener.h
+// account_verify_sdk_core
+//
+// Created by zhuof on 2018/3/7.
+// Copyright © 2018年 xiaowo. All rights reserved.
+//
+
+#import
+
+typedef void (^UniResultListener)(NSDictionary *data);
diff --git a/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/Headers/account_login_sdk_noui_core.h b/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/Headers/account_login_sdk_noui_core.h
new file mode 100755
index 0000000..7638769
--- /dev/null
+++ b/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/Headers/account_login_sdk_noui_core.h
@@ -0,0 +1,20 @@
+//
+// account_login_sdk_noui_core.h
+// account_login_sdk_noui_core
+//
+// Created by zhuof on 2018/3/19.
+// Copyright © 2018年 xiaowo. All rights reserved.
+//
+
+#import
+
+//! Project version number for account_login_sdk_noui_core.
+FOUNDATION_EXPORT double account_login_sdk_noui_coreVersionNumber;
+
+//! Project version string for account_login_sdk_noui_core.
+FOUNDATION_EXPORT const unsigned char account_login_sdk_noui_coreVersionString[];
+
+// In this header, you should import all the public headers of your framework using statements like #import
+
+#import
+
diff --git a/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/Info.plist b/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/Info.plist
new file mode 100755
index 0000000..94393a1
Binary files /dev/null and b/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/Info.plist differ
diff --git a/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/Modules/module.modulemap b/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/Modules/module.modulemap
new file mode 100755
index 0000000..2cb0d8b
--- /dev/null
+++ b/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/Modules/module.modulemap
@@ -0,0 +1,6 @@
+framework module account_login_sdk_noui_core {
+ umbrella header "account_login_sdk_noui_core.h"
+
+ export *
+ module * { export * }
+}
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
new file mode 100755
index 0000000..6219a44
Binary files /dev/null and b/ios/RCTJVerificationModule/account_login_sdk_noui_core.framework/account_login_sdk_noui_core differ
diff --git a/ios/RCTJVerificationModule/libjverification-ios-1.1.2.a b/ios/RCTJVerificationModule/jverification-ios-2.1.1.a
similarity index 52%
rename from ios/RCTJVerificationModule/libjverification-ios-1.1.2.a
rename to ios/RCTJVerificationModule/jverification-ios-2.1.1.a
index facb6b7..165a485 100755
Binary files a/ios/RCTJVerificationModule/libjverification-ios-1.1.2.a and b/ios/RCTJVerificationModule/jverification-ios-2.1.1.a differ
diff --git a/package.json b/package.json
index 642d25b..c3c1ac1 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "jverification-react-native",
- "version": "1.2.3",
+ "version": "2.0.0",
"description": "极光认证 react-native 插件,极光认证整合了三大运营商的号码认证能力,为开发者提供了快速验证用户输入的手机号码和本机SIM卡号码一致性的功能,提高用户体验和安全性。",
"main": "index.js",
"scripts": {
@@ -14,7 +14,7 @@
"jverification",
"react-native"
],
- "author": "huminios,JoshLipan",
+ "author": "huminios,JoshLipan,wicked-tc130",
"license": "MIT",
"bugs": {
"url": "https://github.com/jpush/jverification-react-native/issues"