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

Compare commits

..

3 Commits

Author SHA1 Message Date
sunnylqm
d9bbaf77aa v8.0.0 2022-07-04 18:16:24 +08:00
sunnylqm
736699a922 Remove update.json import in simpleUpdate 2022-07-04 18:14:51 +08:00
Sunny Luo
91f877dc6d Update README.md 2022-06-13 16:36:00 +08:00
3 changed files with 8 additions and 6 deletions

View File

@@ -9,11 +9,12 @@
### 优势
1. 基于阿里云高速 CDN 分发,对比其他服务器在国外的热更新服务,分发更稳定,更新成功率极高。
2. 基于 bsdiff/hdiff 算法创建的**超小更新包**,通常版本迭代后在 1-10KB 之间,避免数百 KB 的流量消耗
2. 基于 bsdiff/hdiff 算法创建的**超小更新包**,通常版本迭代后在 1-10KB 之间(其他全量热更新服务所需流量通常在 1-10MB 级别)
3. 跨越多个版本进行更新时,只需要下载**一个更新包**,不需要逐版本依次更新。
4. 命令行工具&网页双端管理,版本发布过程简单便捷,完全可以集成 CI。
5. 支持崩溃回滚,安全可靠。
6. meta 信息及开放 API提供更高扩展性。
7. 提供付费的专人技术支持。
### 本地开发

View File

@@ -12,10 +12,11 @@ import {
downloadAndInstallApk,
} from './main';
import _updateConfig from '../../../update.json';
const { appKey } = _updateConfig[Platform.OS];
export function simpleUpdate(WrappedComponent) {
export function simpleUpdate(WrappedComponent, options = {}) {
const { appKey } = options;
if (!appKey) {
throw new Error('appKey is required for simpleUpdate()');
}
return __DEV__
? WrappedComponent
: class AppUpdate extends Component {

View File

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