Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do OTA updates in Expo get in motion on the first opening after brand new download from the stores?

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

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.

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.

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?

like image 469
fedorqui 'SO stop harming' Avatar asked Apr 05 '19 09:04

fedorqui 'SO stop harming'


People also ask

Does Apple allow OTA updates?

Apple introduced OTA updates to iOS devices with the release of iOS 5.0. 1. Previously, end users needed to connect the device to a computer using a USB cord and update the OS through iTunes. With OTA updates, however, Apple can deliver updates remotely in unencrypted zip files.

How to test Expo updates?

To test manual updates in the Expo Go app, run eas update and then open the published version of your app with Expo Go.


1 Answers

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

  • 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.

Check here for more info: https://docs.expo.io/versions/latest/guides/configuring-ota-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/

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.

Hope this helps!

like image 148
Jacob Sievers Avatar answered Oct 19 '22 21:10

Jacob Sievers