Skip to content

Dev #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open

Dev #39

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
02c419b
- 更新SDK版本 iOS更新至认证SDK2.7.5 Android更新至认证SDK2.7.4。
Sep 6, 2021
73e2230
Merge pull request #31 from PRLsir/dev
PRLsir Sep 7, 2021
052fdb7
ios 更新原生SDK到277
PRLsir Feb 23, 2022
c1d5b90
更新认证android到2.7.7
linuxhsj Mar 21, 2022
0bac3c0
更新认证android到2.7.7
linuxhsj Mar 21, 2022
ca1cfc0
更新认证android到2.7.7
linuxhsj Mar 21, 2022
273f7e8
Merge remote-tracking branch 'origin/dev' into dev
linuxhsj Mar 21, 2022
d251666
修复华为手机android 8上移动卡授权页加载不出来问题http://jira.jpushoa.com/browse/TS-7200
linuxhsj Apr 26, 2022
45af89d
修复华为手机android 8上电信联通卡授权页加载不出来问题http://jira.jpushoa.com/browse/TS-7200
linuxhsj Apr 27, 2022
ae44bcb
### v 2.5.5
Jun 2, 2022
37a4adf
demo环境升级
PRLsir Jul 18, 2023
57b18db
ios升级极光认证原生SDK到3.1.0
PRLsir Jul 18, 2023
df1436a
优化Android环境
PRLsir Jul 21, 2023
18834d9
Android升级极光认证原生SDK到3.1.7
PRLsir Nov 14, 2023
cee6ce1
版本改为2.5.9
PRLsir Nov 14, 2023
b6e871c
iOS 更新到3.1.9版本,版本改为2.6.0
huangshuni Jan 19, 2024
700f2db
升级android sdk
Apr 3, 2024
677080e
更新iOS SDK 为 3.2.1,兼容rn jsBundleURLForBundleRoot 方法。 修改版本号为2.6.1
huangshuni Apr 15, 2024
8bd614b
增加android appkey基础manifest配置
May 9, 2024
2e471bd
修改插件的依赖
huangshuni Jul 1, 2024
29f962d
升级android sdk3.2.5;版本号2.6.3
Aug 14, 2024
be12c36
版本号更新为2.6.4
Aug 14, 2024
78bbff1
iOS 添加图片说明
huangshuni Aug 22, 2024
99fb57c
Merge branch 'dev1' into dev
huangshuni Aug 22, 2024
94beb4a
增加预取号额外返回参数
Aug 23, 2024
98ab7b4
iOS 升级SDK版本为3.2.3版本
huangshuni Aug 23, 2024
79735b4
版本号升级为2.6.5
Aug 23, 2024
f1cccfe
iOS 一键登录页面支持视频和gif图片设置
huangshuni Sep 20, 2024
c7ee6a8
iOS修复loadingConstraints不生效的问题
huangshuni Sep 20, 2024
f01a4e6
升级android SDK; 增加视频,gif背景,状态栏透明等UI设置
Sep 20, 2024
c5f4073
Merge branch 'dev' of https://github.com/jpush/jverification-react-na…
Sep 20, 2024
7e4fe18
版本号升级为2.6.6
Sep 20, 2024
255d6f9
Api文档更新
Sep 23, 2024
20b5f9c
修复bug
Sep 23, 2024
69078cf
修改加载视频方式
Sep 24, 2024
6bf9a77
更新iOS SDK为3.2.6
huangshuni Jan 23, 2025
8d2bd1c
iOS bool传值问题修复
huangshuni Feb 14, 2025
7c6b216
修改版本号为2.6.9
huangshuni Feb 14, 2025
b434b68
修复rn0.76.6版本 iOS 一键登录页面加载不了自定义rn视图的问题
huangshuni Feb 19, 2025
2540ce0
修改版本号为2.7.0
huangshuni Feb 20, 2025
ed7b8e1
升级iOS、Android SDK;同步iOS、Android主要部分ui config;loginAuth接口增加timeout,cal…
May 14, 2025
19a949f
demo&文档更新
May 15, 2025
c07da1b
Update README.md
yukirin000 May 15, 2025
f8cef2f
Update README.md
yukirin000 May 15, 2025
6a02967
删除过期文档
May 15, 2025
9c33458
Merge branch 'dev' of https://github.com/jpush/jverification-react-na…
May 15, 2025
158c50f
回滚
May 15, 2025
bf32349
更新iOS/Android SDK 3.4.1版本;版本号2.8.1
Jun 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
507 changes: 507 additions & 0 deletions API.md

Large diffs are not rendered by default.

548 changes: 0 additions & 548 deletions API详细说明.md

This file was deleted.

2 changes: 2 additions & 0 deletions AwesomeProject/.bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BUNDLE_PATH: "vendor/bundle"
BUNDLE_FORCE_RUBY_PLATFORM: 1
4 changes: 4 additions & 0 deletions AwesomeProject/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: '@react-native',
};
38 changes: 27 additions & 11 deletions example/.gitignore → AwesomeProject/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace
**/.xcode.env.local

# Android/IntelliJ
#
Expand All @@ -29,31 +29,47 @@ build/
.gradle
local.properties
*.iml
*.hprof
.cxx/
*.keystore
!debug.keystore
.kotlin/

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
*.keystore

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots
**/fastlane/report.xml
**/fastlane/Preview.html
**/fastlane/screenshots
**/fastlane/test_output

# Bundle artifact
*.jsbundle

# CocoaPods
/ios/Pods/
# Ruby / CocoaPods
**/Pods/
/vendor/bundle/

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*

# testing
/coverage

# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
3 changes: 2 additions & 1 deletion example/.prettierrc.js → AwesomeProject/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
arrowParens: 'avoid',
bracketSameLine: true,
bracketSpacing: false,
jsxBracketSameLine: true,
singleQuote: true,
trailingComma: 'all',
};
1 change: 1 addition & 0 deletions AwesomeProject/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
131 changes: 98 additions & 33 deletions example/App.js → AwesomeProject/App.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React from 'react';
import {StyleSheet, Text, View,Alert, TouchableHighlight, Platform} from 'react-native';
import {StyleSheet, Text, View,Alert, TouchableHighlight, Platform, Dimensions} from 'react-native';
import JVerification from 'jverification-react-native';


const styles = StyleSheet.create({
container: {
flex: 1,
Expand Down Expand Up @@ -48,8 +47,8 @@ class Button extends React.Component {


const initParams = {
'time': 5000,
'appKey': 'a0e6ace8d5b3e0247e3f58db', //仅iOS
'time': 10000,
'appKey': '4fcc3e237eec4c4fb804ad49', //仅iOS
'channel': 'channel', //仅iOS
'advertisingId': 'advertisingId', //仅iOS
'isProduction': false, //仅iOS
Expand All @@ -59,6 +58,12 @@ const initParams = {


const customUIWithConfigiOS = {
backgroundImage: 'cmBackground.jpeg', // 背景图
// backgroundGifImage: 'auth.gif', // 背景gif图
// backgroundVideo: 'videoBg.mp4', // 背景视频
// backgroundVideo: 'http://vjs.zencdn.net/v/oceans.mp4', // 背景视频,可以是网络视频
// backgroundVideoPlaceHolderImage: 'cmBackground.jpeg', //背景视频占位图

showWindow:false,
navReturnHidden:false,
//logo
Expand All @@ -76,30 +81,61 @@ const customUIWithConfigiOS = {
checkViewConstraints:[-108,180,10,10],
unAgreePrivacyCallBack:true,

privacyOne: ['隐私条款一', 'https://www.jiguang.cn/about'], //隐私条款一(显示名称和url,请严格按照格式)
privacyTwo: ['隐私条款二', 'https://www.jiguang.cn/about'], //隐私条款二(显示名称和url,请严格按照格式)
privacyNameAndUrlBeanList: [{'name':'隐私条款一','url':'https://www.jiguang.cn/about','separator':'、'}, {'name':'隐私条款一','url':'https://www.jiguang.cn/about','separator':'、'}],
privacyColor: [-16777216, -65536], //隐私条款颜色 (显示名称和url的颜色,请严格按照格式)
privacyText: ['登录即同意', '和', '、', '并使用本机号码登录'], //隐私条款名称外的文字
privacyText: ['登录即同意', '并使用本机号码登录'], //隐私条款名称外的文字
privacyTextSize: 15, //隐私条款文字字体大小
privacyTextGravityMode: 'left', //隐私条款文本对齐方式,目前仅支持 left、center
privacyBookSymbolEnable: false, //隐私条款是否显示书名号,默认不显示

appLanguageType: '0',
navTransparent: true,
textVerAlignment: 1,
isAlertPrivacyVC: true,
agreementAlertViewBackgroundColor: 0xffffff,
agreementAlertViewCornerRadius: 10,
agreementAlertViewContentTextFontSize: 16,
agreementAlertViewLogBtnText: '同意',
agreementAlertViewUIFrames: {
"superViewFrame": [
(Dimensions.get('window').width / 2) - 140,
(Dimensions.get('window').height / 2) - 150,
280,
220
],
"alertViewFrame": [0, 0, 280, 200],
"titleFrame": [10, 10, 260, 60],
"contentFrame": [15, 70, 250, 110],
"buttonFrame": [70, 160, 140, 40]
},
loadingConstraints:[0,0,20,20],
smsUIConfig:{
smsAuthPageBackgroundImagePath:'cmBackground.jpeg',
smsLogBtnBackgroundPath:"loginBtn_Hig",
privacyText: ['开头', '结尾'], //隐私条款名称外的文字
smsPrivacyBeanList:[{'name':'隐私条款一','url':'https://www.jiguang.cn/about','separator':'、'}, {'name':'隐私条款一','url':'https://www.jiguang.cn/about','separator':'、'}],
enableSMSService:true,

}
}
const customUIWithConfigAndroid = {
backgroundImage: '', //背景图
backgroundImage: 'main_bg', //背景
// backgroundGifImage: 'main_gif' , //背景gif
// backgroundVideo: 'test', //背景视频
// backgroundVideoPlaceHolderImage: 'main_bg', //背景视频默认图

statusBarTransparent: true, //状态栏是否透明
statusBarHidden: false, //状态栏是否隐藏
statusBarMode: 'light', //状态栏模式 light,dark
statusBarMode: 'dark', //状态栏模式 light,dark

navHidden: false, //导航栏是否隐藏
navTransparent: true,
navColor: -16777216, //导航栏颜色

navTitle: 'RN-JVerification', //导航栏标题
navTitleSize: 16, //导航栏标题文字字体大小(单位:sp)
navTitleColor: -1, //导航栏标题文字颜色

navReturnHidden: false, //导航栏返回按钮是否隐藏
navReturnImage: 'close', //导航栏左侧返回按钮图标
navReturnHidden: true, //导航栏返回按钮是否隐藏
// navReturnImage: 'close', //导航栏左侧返回按钮图标
//为保障显示效果,请同时设置x,y,w,h
navReturnX: 5, //导航栏左侧返回按钮图标距屏幕上端偏移(仅Android)
navReturnY: 5, //导航栏左侧返回按钮图标距屏幕左侧偏移(仅Android)
Expand Down Expand Up @@ -144,18 +180,17 @@ const customUIWithConfigAndroid = {
// loginBtnW: 250, //登录按钮宽度
// loginBtnH: 40, //登录按钮高度

privacyOne: ['隐私条款一', 'https://www.jiguang.cn/about'], //隐私条款一(显示名称和url,请严格按照格式)
privacyTwo: ['隐私条款二', 'https://www.jiguang.cn/about'], //隐私条款二(显示名称和url,请严格按照格式)
privacyOne: ['隐私条款一', 'https://www.jiguang.cn/about'], //隐私条款一(显示名称和url,请严格按照格式)过期 2.7.3+不生效
privacyTwo: ['隐私条款二', 'https://www.jiguang.cn/about'], //隐私条款二(显示名称和url,请严格按照格式)过期 2.7.3+不生效
privacyNameAndUrlBeanList: [{'name':'隐私条款一','url':'https://www.jiguang.cn/about','beforeName':'、'}, {'name':'隐私条款一','url':'https://www.jiguang.cn/about','beforeName':'、'}],
privacyColor: [-16777216, -65536], //隐私条款颜色 (显示名称和url的颜色,请严格按照格式)
privacyText: ['登录即同意', '和', '、', '并使用本机号码登录'], //隐私条款名称外的文字
privacyText: ['登录即同意', '并使用本机号码登录1'], //隐私条款名称外的文字
privacyTextSize: 15, //隐私条款文字字体大小
privacyTextGravityMode: 'left', //隐私条款文本对齐方式,目前仅支持 left、center
privacyBookSymbolEnable: false, //隐私条款是否显示书名号,默认不显示
//为保障显示效果,请同时设置x,y,w,h
// privacyX:50, //隐私条款相对于屏幕左边x轴偏移
// privacyY:20, //隐私条款相对于授权页面底部下边缘y偏移
// privacyW:200, //隐私条款宽度
// privacyH:100, //隐私条款高度
privacyY:60, //隐私条款相对于授权页面底部下边缘y偏移


privacyCheckboxHidden: false, //checkBox是否隐藏,默认不隐藏
privacyCheckEnable: false, //checkBox默认状态 默认:NO
Expand All @@ -168,7 +203,21 @@ const customUIWithConfigAndroid = {
privacyWebNavTitle: '服务条款', //协议页导航栏标题(仅iOS)
privacyWebNavTitleSize: 16, //协议页导航栏标题字体大小
privacyWebNavTitleColor: -1, //协议页导航栏标题字体颜色
privacyWebNavReturnImage: 'close', //协议页导航栏返回按钮图片
// privacyWebNavReturnImage: 'close', //协议页导航栏返回按钮图片
enablePrivacyCheckDialog: true, //是否开启协议二次弹窗
appLanguageType: '0',

privacyCheckDialogGravityModeCenter: true,
setPrivacyCheckDialogTitleText: "测试协议标题",
setPrivacyCheckDialogLogBtnText: "同11意",
setPrivacyCheckDialogTitleTextSize: 22,
setPrivacyCheckDialogContentTextSize: 15,

smsUIConfig:{
smsPrivacyBeanList:[{'name':'隐私条款一','url':'https://www.jiguang.cn/about','beforeName':'、'}, {'name':'隐私条款一','url':'https://www.jiguang.cn/about','beforeName':'、'}],
enableSMSService:true,
smsPrivacyOffsetY: 60,
}
};

const customViewParams = [
Expand All @@ -192,7 +241,7 @@ const androidDialogConfig = {
navColor:0xff000000,
loginBtnText:" 极光认证测试 ",
privacyCheckEnable:false,
privacyColor:[0xff00f000,0xff000000],
// privacyColor:[0xff00f000,0xff000000],
loginBtnWidth:40,
privacyOne: ['隐私条款一', 'https://www.jiguang.cn/about'], //隐私条款一(显示名称和url,请严格按照格式)
privacyColor: [-16777216, -65536], //隐私条款颜色 (显示名称和url的颜色,请严格按照格式)
Expand Down Expand Up @@ -226,7 +275,7 @@ const iosDialogConfig = {

export default class App extends React.Component {

createAlert = (title) =>
createAlert = (title: string) =>
Alert.alert(
"提示",
title,
Expand All @@ -235,18 +284,21 @@ export default class App extends React.Component {
]
);

constructor(props) {
constructor(props: object) {
super(props);
}

LoginListener?: Function
UnCheckboxEvent?: Function

componentDidMount() {
JVerification.setLoggerEnable(true);
this.LoginListener = result => {
this.LoginListener = (result: any) => {
console.log('LoginListener:' + JSON.stringify(result));
};
JVerification.addLoginEventListener(this.LoginListener);
if(Platform.OS == 'ios'){
this.UnCheckboxEvent = result => {
this.UnCheckboxEvent = (result: any) => {
console.log('UnCheckboxEvent:未选中隐私协议框');
this.createAlert('Listener:未选中隐私协议框' );
}
Expand All @@ -259,32 +311,32 @@ export default class App extends React.Component {
<View style={styles.container}>

<Button title='init'
onPress={() => JVerification.init(initParams, result => {
onPress={() => JVerification.init(initParams, (result: any) => {
console.log('init:' + JSON.stringify(result));
this.createAlert('init:' + JSON.stringify(result));
})}/>

<Button title='isInitSuccess'
onPress={() => JVerification.isInitSuccess(result => {
onPress={() => JVerification.isInitSuccess((result: any) => {
console.log('isInitSuccess:' + JSON.stringify(result));
this.createAlert('isInitSuccess:' + JSON.stringify(result));
})}/>

<Button title='checkLoginEnable'
onPress={() => JVerification.checkLoginEnable(result => {
onPress={() => JVerification.checkLoginEnable(true,(result: any) => {
console.log('checkLoginEnable:' + JSON.stringify(result));
this.createAlert('checkLoginEnable:' + JSON.stringify(result));
})}/>

<Button title='getToken'
onPress={() => JVerification.getToken(5000, result => {
onPress={() => JVerification.getToken(5000, (result: any) => {
console.log('getToken:' + JSON.stringify(result));
this.createAlert('getToken:' + JSON.stringify(result));

})}/>

<Button title='preLogin'
onPress={() => JVerification.preLogin(5000, result => {
onPress={() => JVerification.preLogin(5000, (result: any) => {
console.log('preLogin:' + JSON.stringify(result));
this.createAlert('preLogin:' + JSON.stringify(result));
})}/>
Expand All @@ -308,12 +360,25 @@ export default class App extends React.Component {
}}/>

<Button title='login'
onPress={() => JVerification.login(true)}/>
onPress={() => JVerification.login(true, 10000, (result: any) => {
console.log('login:' + JSON.stringify(result));
setTimeout(() => {
this.createAlert('login:' + JSON.stringify(result));
}, 100);
})}/>

<Button title='获取验证码' onPress={() => JVerification.getVerifyCode(codeConfig, result => {
<Button title='获取验证码' onPress={() => JVerification.getVerifyCode(codeConfig, (result: any) => {
console.log('获取验证码:' + JSON.stringify(result));
})}/>

<Button title='短信登录'
onPress={() => JVerification.smsLogin(true, 10000, (result: any) => {
console.log('smslogin:' + JSON.stringify(result));
setTimeout(() => {
this.createAlert('smslogin:' + JSON.stringify(result));
}, 100);
})}/>

<Button title='设置获取验证码时间间隔' onPress={() => JVerification.setCodeTime(1000)}/>


Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions AwesomeProject/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 2.6.10"

# Exclude problematic versions of cocoapods and activesupport that causes build failures.
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
gem 'xcodeproj', '< 1.26.0'
gem 'concurrent-ruby', '< 1.3.4'

# Ruby 3.4.0 has removed some libraries from the standard library.
gem 'bigdecimal'
gem 'logger'
gem 'benchmark'
gem 'mutex_m'
Loading