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}`, {