javascript - React Native软件如何更新详解

标签 javascript android ios react-native code-push

我正在开发 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您可以在您的应用程序中使用它而无需支付任何费用。还有一些付费或免费的系统,但我从未使用过它们,所以我不能对它们发表任何评论。

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

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

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

关于javascript - React Native软件如何更新详解,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46264146/

相关文章:

iphone - Uiwebview中的多个html页面

javascript - 在桌面上查看时如何展开 Bootstrap 3 下拉菜单?

JavaScript 面向对象问题

java - JNI - GetObjectField 返回 NULL

java - Android:将数据插入 trie 时读取 txt 文件缓慢和内存泄漏(错误的 hashmap 使用)?

ios - AVPlayerItemDidPlayToEndTimeNotification 在项目未完成播放时发布

javascript - Selenium 网络驱动程序(火狐): dynamically disable Javascript

javascript - RegEx 与 MT940 语句中的最后一行不匹配 :86: tag

android - Jetpack Compose 中的 MaterialButtonToggleGroup

ios - 将数据从 iOS 应用程序发送到外部连接的非 iOS 设备