Expo 的 OTA 更新是否会在从商店全新下载后首次开放时启动? [英] Do OTA updates in Expo get in motion on the first opening after brand new download from the stores?

查看:8
本文介绍了Expo 的 OTA 更新是否会在从商店全新下载后首次开放时启动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 React Native 开发了一个应用程序,并使用 Expo 分发它.我将最终版本发布到 Google Play 和 Apple Store.

I developed an app with React Native and distributed it with Expo. I published the final version into Google Play and Apple Store.

一段时间后,我在 Expo 的发布文档中发现expo publish 允许您创建内置于 Expo 中的 OTA(无线")更新,并根据 这个答案:

Some time later I discovered in Expo's docs on Publishing that expo publish allows you to create an OTA ("over the air") update that is built into Expo and updates the app automatically, according to this answer:

独立应用知道在您的应用发布的网址中查找更新.

The standalone app knows to look for updates at your app's published url.

我对此进行了测试并且效果很好.

This I tested and worked very well.

但是,现在我发现人们从商店(即 Google Play 或 Apple Store)下载该应用程序显然获得了该应用程序的初始版本,而不是更新版本.

However, now I see that people downloading the app from the stores (that is, either Google Play or Apple Store) apparently get the initial version of the app, not the updated one.

OTA 更新的具体工作流程是什么?他们第一次打开 Google Play 和 Apple Store 时会去替换"现有版本吗?还是他们需要重新打开它才能获得更新?

What is the exact workflow for the OTA updates? Do they go and "replace" the existing version in Google Play and Apple Store the first time they open it? Or do they need to open it over again to get the update?

究竟是什么触发了应用的更新?

And what exactly triggers the update of the app?

推荐答案

我们也遇到过类似的问题.在您的情况下,我可以看到两件事可能导致这种情况:

We've been having similar problems. I can see two things which might be causing this in your case:

  • 如果设置了 updates.fallbackToCacheTimeout,则检查 app.json.如果已设置,则 expo 在显示最后下载的版本(将是初始下载后的初始版本)之前尝试下载最新更新的时间.
  • 如果您有较大的更新,expo 会尝试下载更新 30 秒,然后再显示您应用的最新版本.
  • Check in app.json if updates.fallbackToCacheTimeout is set. If it's set, that's how long expo will try to download the latest update before showing the last downloaded version (which will be the initial version after initial download).
  • If you have a large update, expo will try downloading the update for 30s before showing the last version of your app.

查看此处了解更多信息:https://docs.expo.io/versions/latest/guides/configuring-ota-updates/

Check here for more info: https://docs.expo.io/versions/latest/guides/configuring-ota-updates/

OTA 更新不会替换从应用商店下载的版本,它们首先存储在设备的缓存中,然后在下载后在应用启动时运行.来源 https://docs.expo.io/versions/latest/sdk/updates/

OTA updates do not replace the version downloaded from the app store, they are stored first in the device's cache before being run on app start after download. Source https://docs.expo.io/versions/latest/sdk/updates/

更新下载会在应用启动时自动触发,然后,根据设置,它会在显示应用之前等待(只要 updates.fallbackToCacheTimeout 允许),或者立即显示.

Update downloads are automatically triggered on app start, then, depending on the settings it will either wait (as long as updates.fallbackToCacheTimeout allows) before showing the app, or show it immediately.

您可以强制应用程序运行最新更新(如果您有一个等待更新),只需强制退出应用程序,然后重新启动.

You can force the app to run the latest update (if you have one waiting) by just force quitting the app, then restarting.

希望这会有所帮助!

这篇关于Expo 的 OTA 更新是否会在从商店全新下载后首次开放时启动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆