|
1 | 1 | # react-native-update [](http://badge.fury.io/js/react-native-update) |
2 | 2 |
|
3 | | -本组件是面向 React Native 提供热更新功能的组件,详情请访问我们的官方网站 <https://pushy.reactnative.cn>。 |
| 3 | +[中文文档](./README-CN.md) |
4 | 4 |
|
5 | | -**现已支持鸿蒙以及新架构** |
| 5 | +`react-native-update` provides over-the-air update capabilities for React Native apps. For full documentation, visit: |
6 | 6 |
|
7 | | -### 快速开始 |
| 7 | +- China service: <https://pushy.reactnative.cn> |
| 8 | +- Global service: <https://cresc.dev> |
8 | 9 |
|
9 | | -请查看[文档](https://pushy.reactnative.cn/docs/getting-started.html) |
| 10 | +## Regional Service Notice |
10 | 11 |
|
11 | | -### 优势 |
| 12 | +- **Pushy** (<https://pushy.reactnative.cn>) is the China service, operated by **Wuhan Qingluo Network Technology Co., Ltd.**, with servers and user data hosted in mainland China. |
| 13 | +- **Cresc** (<https://cresc.dev>) is the global service, operated by **CHARMLOT PTE. LTD.**, with servers and user data hosted in Singapore. |
| 14 | +- Pushy and Cresc are operated by different legal entities with separate infrastructure, data storage, and admin systems. Developers outside mainland China should use Cresc directly. |
12 | 15 |
|
13 | | -1. 对中国用户使用阿里云高速 CDN 分发,对比其他服务器在国外的热更新服务,分发更稳定,更新成功率极高。对国外用户则智能分流至 cloudflare,同样享受高速更新服务。 |
14 | | -2. 基于 bsdiff/hdiff 算法创建的**超小更新包**,通常版本迭代后在几十至几百 KB 级别(其他全量热更新服务所需流量通常在几十 MB 级别)。 |
15 | | -3. 始终跟进 RN 最新正式版本,第一时间提供支持。支持 hermes 字节码格式。支持新架构(注:安卓 0.73.0 ~ 0.76.0 的新架构因官方 bug 不支持,0.73 以下或 0.76.1 以上的新架构可用)。 |
16 | | -4. 跨越多个版本进行更新时,只需要下载**一个更新包**,不需要逐版本依次更新。 |
17 | | -5. 命令行工具 & 网页双端管理,版本发布过程简单便捷,完全可以集成 CI。 |
18 | | -6. 支持崩溃回滚,安全可靠。 |
19 | | -7. meta 信息及开放 API,提供更高扩展性。 |
20 | | -8. 提供付费的专人技术支持。 |
| 16 | +**HarmonyOS and React Native New Architecture are supported.** |
21 | 17 |
|
22 | | -### 与其他热更新库对比 |
| 18 | +## Quick Start |
23 | 19 |
|
24 | | -| 对比维度 | react-native-update | expo-update | react-native-code-push | |
25 | | -|---------|---------------------|-------------|------------------------| |
26 | | -| **价格/成本** | 提供免费额度,多级梯度付费(最低约 66 元/月),流量不单独计费 | 提供免费额度,多级梯度付费(最低约 136 元/月),超出流量额外计费 | ❌ **已停运**(Microsoft App Center 已于 2025 年 3 月 31 日停止服务) | |
27 | | -| **更新包大小** | ⭐⭐⭐⭐⭐ 几十至几百 KB(增量更新) | ⭐⭐⭐ 全量更新(通常几十 MB) | ❌ **已停运** | |
28 | | -| **中国地区访问速度** | ⭐⭐⭐⭐⭐ 阿里云 CDN,速度极快 | ⭐⭐ 国外服务器,可能较慢 | ❌ **已停运** | |
29 | | -| **iOS 支持** | ✅ 支持 | ✅ 支持 | ❌ **已停运** | |
30 | | -| **Android 支持** | ✅ 支持 | ✅ 支持 | ❌ **已停运** | |
31 | | -| **鸿蒙支持** | ✅ 支持 | ❌ 不支持 | ❌ **已停运** | |
32 | | -| **Expo 支持** | ✅ 支持 | ✅ 支持 | ❌ **已停运** | |
33 | | -| **RN 版本支持** | ⭐⭐⭐⭐⭐ 第一时间支持最新版本 | ⭐⭐⭐⭐ 跟随 Expo SDK | ❌ **已停运** | |
34 | | -| **新架构支持** | ✅ 支持 | ✅ 支持 | ❌ **已停运** | |
35 | | -| **Hermes 支持** | ✅ 支持 | ✅ 支持 | ❌ **已停运** | |
36 | | -| **崩溃回滚** | ✅ 自动回滚机制 | ✅ 支持 | ❌ **已停运** | |
37 | | -| **管理界面** | ✅ 命令行工具 + Web 管理界面 | ✅ Expo Dashboard | ❌ **已停运** | |
38 | | -| **CI/CD 集成** | ✅ 支持 | ✅ 支持 | ❌ **已停运** | |
39 | | -| **API 扩展性** | ✅ Meta 信息 + 开放 API | ⚠️ 有限 | ❌ **已停运** | |
40 | | -| **中文文档/支持** | ⭐⭐⭐⭐⭐ 完整中文文档,中文社区支持 | ⭐⭐ 英文为主 | ❌ **已停运** | |
41 | | -| **技术支持** | ✅ 付费专人技术支持 | ⚠️ 社区支持 | ❌ **已停运** | |
42 | | -| **服务器部署** | ✅ 可托管也可付费私有部署 | ✅ Expo 托管(EAS Update) | ❌ **已停运** | |
43 | | -| **更新策略** | 灵活配置(静默/提示/立即/延迟) | 相对固定 | ❌ **已停运** | |
44 | | -| **流量消耗** | ⭐⭐⭐⭐⭐ 极低(增量更新) | ⭐⭐⭐ 较高(全量更新) | ❌ **已停运** | |
45 | | -| **更新成功率** | ⭐⭐⭐⭐⭐ 极高(国内 CDN 优势) | ⭐⭐⭐ 中等 | ❌ **已停运** | |
46 | | - |
47 | | - |
48 | | - |
49 | | -### 本地开发 |
| 20 | +See the docs: |
50 | 21 |
|
51 | | -``` |
52 | | -$ git clone git@github.com:reactnativecn/react-native-update.git |
53 | | -$ cd react-native-pushy/Example/testHotUpdate |
54 | | -$ yarn |
55 | | -$ yarn start |
| 22 | +- Chinese docs: <https://pushy.reactnative.cn/docs/getting-started.html> |
| 23 | +- English docs: <https://cresc.dev/docs/getting-started> |
| 24 | + |
| 25 | +## Advantages |
| 26 | + |
| 27 | +1. For users in China, updates are distributed through Alibaba Cloud CDN for high stability and excellent delivery success. For developers outside mainland China, Cresc provides a dedicated global service with fast and reliable worldwide delivery. |
| 28 | +2. **Tiny update packages** generated with bsdiff/hdiff are typically only tens to hundreds of KB, instead of the tens of MB usually required by full-bundle update systems. |
| 29 | +3. The library tracks new React Native stable releases closely, supports Hermes bytecode, and supports the new architecture. Note: Android RN 0.73.0 to 0.76.0 new architecture is unavailable because of upstream issues; versions below 0.73 or above 0.76.1 are supported. |
| 30 | +4. When updating across multiple versions, clients only need to download **one update package** instead of applying every intermediate version in sequence. |
| 31 | +5. Command-line tools and a web dashboard are both available, making release workflows simple and CI-friendly. |
| 32 | +6. Built-in crash rollback keeps updates safe and reliable. |
| 33 | +7. Meta information and open APIs make the system more extensible. |
| 34 | +8. Paid technical support is available. |
| 35 | + |
| 36 | +## Comparison With Other OTA Libraries |
| 37 | + |
| 38 | +| Category | react-native-update | expo-update | react-native-code-push | |
| 39 | +|---------|---------------------|-------------|------------------------| |
| 40 | +| **Price / Cost** | Free tier with multiple paid plans (starting at about CNY 66/month), bandwidth included | Free tier with multiple paid plans (starting at about CNY 136/month), extra bandwidth charges apply | ❌ **Discontinued** (Microsoft App Center shut down on March 31, 2025) | |
| 41 | +| **Package Size** | ⭐⭐⭐⭐⭐ Tens to hundreds of KB (incremental) | ⭐⭐⭐ Full bundle updates (usually tens of MB) | ❌ **Discontinued** | |
| 42 | +| **China Access Speed** | ⭐⭐⭐⭐⭐ Alibaba Cloud CDN, very fast | ⭐⭐ Overseas servers, may be slower | ❌ **Discontinued** | |
| 43 | +| **iOS Support** | ✅ Supported | ✅ Supported | ❌ **Discontinued** | |
| 44 | +| **Android Support** | ✅ Supported | ✅ Supported | ❌ **Discontinued** | |
| 45 | +| **HarmonyOS Support** | ✅ Supported | ❌ Not supported | ❌ **Discontinued** | |
| 46 | +| **Expo Support** | ✅ Supported | ✅ Supported | ❌ **Discontinued** | |
| 47 | +| **RN Version Support** | ⭐⭐⭐⭐⭐ Fast support for latest stable RN versions | ⭐⭐⭐⭐ Follows Expo SDK cadence | ❌ **Discontinued** | |
| 48 | +| **New Architecture** | ✅ Supported | ✅ Supported | ❌ **Discontinued** | |
| 49 | +| **Hermes Support** | ✅ Supported | ✅ Supported | ❌ **Discontinued** | |
| 50 | +| **Crash Rollback** | ✅ Automatic rollback | ✅ Supported | ❌ **Discontinued** | |
| 51 | +| **Management UI** | ✅ CLI + Web dashboard | ✅ Expo Dashboard | ❌ **Discontinued** | |
| 52 | +| **CI/CD Integration** | ✅ Supported | ✅ Supported | ❌ **Discontinued** | |
| 53 | +| **API Extensibility** | ✅ Meta info + Open API | ⚠️ Limited | ❌ **Discontinued** | |
| 54 | +| **Chinese Docs / Support** | ⭐⭐⭐⭐⭐ Complete Chinese docs and community support | ⭐⭐ Mostly English | ❌ **Discontinued** | |
| 55 | +| **Technical Support** | ✅ Paid dedicated support | ⚠️ Community support | ❌ **Discontinued** | |
| 56 | +| **Server Deployment** | ✅ Hosted service or paid private deployment | ✅ Hosted by Expo (EAS Update) | ❌ **Discontinued** | |
| 57 | +| **Update Strategy** | Flexible configuration (silent / prompted / immediate / delayed) | More fixed workflow | ❌ **Discontinued** | |
| 58 | +| **Bandwidth Usage** | ⭐⭐⭐⭐⭐ Very low (incremental) | ⭐⭐⭐ Higher (full bundle) | ❌ **Discontinued** | |
| 59 | +| **Update Success Rate** | ⭐⭐⭐⭐⭐ Excellent, especially in China | ⭐⭐⭐ Moderate | ❌ **Discontinued** | |
| 60 | + |
| 61 | +## Local Development |
| 62 | + |
| 63 | +```bash |
| 64 | +git clone git@github.com:reactnativecn/react-native-update.git |
| 65 | +cd react-native-pushy/Example/testHotUpdate |
| 66 | +yarn |
| 67 | +yarn start |
56 | 68 | ``` |
57 | 69 |
|
58 | | -本地库文件使用 yarn link 链接,因此可直接在源文件中修改,在 testHotUpdate 项目中调试。 |
| 70 | +The local library is linked with `yarn link`, so you can modify the source files directly and debug with the `testHotUpdate` example project. |
59 | 71 |
|
60 | | -### 关于我们 |
| 72 | +## About |
61 | 73 |
|
62 | | -本组件由[React Native 中文网](https://reactnative.cn/)独家发布,如有定制需求可以[联系我们](https://reactnative.cn/about.html#content)。 |
| 74 | +This package is published by [React Native Chinese](https://reactnative.cn/). For custom integration or service inquiries, see [Contact Us](https://reactnative.cn/about.html#content). |
63 | 75 |
|
64 | | -关于此插件发现任何问题,可以前往[Issues](https://github.com/reactnativecn/react-native-update/issues)发帖提问。 |
| 76 | +If you find any issues, please open a thread in [Issues](https://github.com/reactnativecn/react-native-update/issues). |
0 commit comments