1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-17 21:26:10 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

Compare commits

...

4 Commits

Author SHA1 Message Date
sunnylqm
b489199572 v5.3.2 2019-10-25 19:05:22 +08:00
sunnylqm
1cb974ca61 修复ios禁用时报错 2019-10-25 19:05:01 +08:00
sunnylqm
b44225f9bd Fix readme format 2019-10-25 12:12:56 +08:00
sunnylqm
7586a5854d Update readme 2019-10-25 12:11:00 +08:00
4 changed files with 13 additions and 11 deletions

View File

@@ -1,5 +1,9 @@
### 最近更新
## 5.3.2 (2019-10-25)
1. 可以禁用ios端以避免审核被拒
## 5.3.0 (2019-09-19)
1. 替换 apk reader 以避免某些环境读取 apk 版本号报错的问题

View File

@@ -2,9 +2,10 @@
本组件是面向 React Native 提供热更新功能的组件,建议结合[Update 服务](https://update.reactnative.cn/)使用。
注意在iOS上使用热更新有被拒的可能。可以按以下步骤屏蔽iOS端:
注意,在 iOS 上使用热更新有被拒的可能。可以按以下步骤屏蔽 iOS 端(`react-native-update`版本需 >= 5.3.2)
1. 如果 RN 版本>=0.60,在项目根目录下编辑或创建 react-native.config.js添加如下内容
1. 如果RN版本>=0.60在项目根目录下编辑或创建react-native.config.js添加如下内容
```js
// react-native.config.js
module.exports = {
@@ -17,11 +18,10 @@ module.exports = {
},
};
```
2. 如果在原生代码端尚未配置则跳过下面文档中的ios端的配置。如果已经配置则按文档的步骤反向操作添加的ios代码删去
3. 如果是0.60以上版本或使用了cocoapods在ios目录中再次运行pod install确保Podfile和Podfile.lock中都没有'react-native-update'。如果RN版本<0.60则运行`react-native unlink react-native-update`
4. 在js代码里调用checkUpdate()方法前判断Platform.OS如果是ios平台则直接return跳过
```
2. 如果在原生代码端尚未配置,则跳过下面文档中的 ios 端的配置。如果已经配置,则按文档的步骤反向操作(添加的 ios 代码删去)。
3. 如果是 0.60 以上版本或使用了 cocoapods在 ios 目录中再次运行 pod install确保 Podfile 和 Podfile.lock 中都没有'react-native-update'。如果 RN 版本<0.60则运行`react-native unlink react-native-update`
4. js 代码里调用 checkUpdate()方法前判断 Platform.OS如果是 ios 平台则直接 return 跳过
### 最近更新
@@ -64,8 +64,7 @@ $ yarn
$ yarn start
```
本地库文件使用yarn link链接因此可直接在源文件中修改在testHotUpdate项目中调试
本地库文件使用 yarn link 链接因此可直接在源文件中修改 testHotUpdate 项目中调试
### 关于我们

View File

@@ -1,5 +1,5 @@
import { NativeAppEventEmitter, NativeModules } from 'react-native';
const { HotUpdate = {} } = NativeModules;
const HotUpdate = NativeModules.HotUpdate || {};
const host = 'https://update.reactnative.cn/api';
@@ -40,7 +40,6 @@ function assertRelease() {
}
}
export async function checkUpdate(APPKEY) {
assertRelease();
const resp = await fetch(`${host}/checkUpdate/${APPKEY}`, {

View File

@@ -1,6 +1,6 @@
{
"name": "react-native-update",
"version": "5.3.1",
"version": "5.3.2",
"description": "react-native hot update",
"main": "lib/index.js",
"scripts": {