详解 React Native 软件更新方式

Detailed explanation on how React Native softwares are updated

我正在开发 React Native 应用程序。它是一个框架,用于使用 JavaScript 构建移动应用程序并使用相同的代码库为 Android & iOS 部署。

我在某处读到 RN 应用程序是动态更新的。这意味着,无需向 AppStore 或 GoogleStore 发布新版本,我们就可以对其进行更新。太棒了!

但我的问题是:我们如何才能这样做?我搜索了一下,发现 Codepush 是可行的。如果是这样,如何?它是免费工具还是我们应该为此付费?如果不是免费的,请问有没有免费的解决方案?

此外,通过动态更新,我们是否仅限于更新 JS 包,或者我们能够更新新字体、图像等外部资产?

如果有专家通过详细信息和解决方法指导我,我将不胜感激。

干杯。

CodePush website;

中所述

CodePush is a cloud service that enables Cordova and React Native developers to deploy mobile app updates directly to their users’ devices. It works by acting as a central repository that developers can publish certain updates to (e.g. JS, HTML, CSS and image changes), and that apps can query for updates from (using our provided client SDKs). This allows you to have a more deterministic and direct engagement model with your end-users, while addressing bugs and/or adding small features that don’t require you to re-build a binary and/or re-distribute it through any public app stores.

这意味着您可以远程更新您的 Javascript 代码,而无需通过 App Store 或 Google Play 提交您的应用。

此服务是 currently completely free,您可以在您的应用中使用它而无需支付任何费用。还有一些付费或免费的系统,但我从未使用过它们,所以我不能说什么。

此服务不允许您更改或更新任何本机代码,因此如果您添加任何本机代码支持的库或自己编写一个库或更新任何现有的本机库或代码,则需要通过商店。

此类服务还可以帮助您进行 A/B 测试和 alfa/beta 测试。

您可以在 CodePush 网站和 Google 上找到更多详细信息。

Codepush是免费的,您可以使用react-native-code-push来使用codepush服务。您可以使用它的文档在您的应用程序上使用此服务。