From 1cb974ca618f37634e17f9badaba971385d585ae Mon Sep 17 00:00:00 2001 From: sunnylqm Date: Fri, 25 Oct 2019 19:05:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dios=E7=A6=81=E7=94=A8?= =?UTF-8?q?=E6=97=B6=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ README.md | 2 +- lib/index.js | 3 +-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec0d694..0979c2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ### 最近更新 +## 5.3.2 (2019-10-25) + +1. 可以禁用ios端以避免审核被拒 + ## 5.3.0 (2019-09-19) 1. 替换 apk reader 以避免某些环境读取 apk 版本号报错的问题 diff --git a/README.md b/README.md index 35a30fd..7d7108d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ 本组件是面向 React Native 提供热更新功能的组件,建议结合[Update 服务](https://update.reactnative.cn/)使用。 -注意,在 iOS 上使用热更新有被拒的可能。可以按以下步骤屏蔽 iOS 端(`react-native-update`版本需 >= 5.3.1): +注意,在 iOS 上使用热更新有被拒的可能。可以按以下步骤屏蔽 iOS 端(`react-native-update`版本需 >= 5.3.2): 1. 如果 RN 版本>=0.60,在项目根目录下编辑或创建 react-native.config.js,添加如下内容 diff --git a/lib/index.js b/lib/index.js index 3c777bb..d206c13 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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}`, {