A quick question on expo-updates in the managed workflow

Hi I have a generic question regarding Expo Updates.

It’s my first project using Expo / React Native and I’m really enjoying it so far - thanks Expo :slight_smile:

I have read the docs/guide and I’m still a little confused about this. I’m using the managed workflow and I’ve just built my first Android bundle. I uploaded that to the Play store and downloaded it on my physical device from an internal test track. I’ve just made a small text change for testing OTA updates and run expo publish. I’m expecting that update to get downloaded by my Android device in the background as I haven’t changed the default config in app.json:

"updates": {
      "fallbackToCacheTimeout": 0
    }

Unfortunately, when I restart the application I do not see the update.

As I understood it, the OTA updates work ‘out of the box’ on a managed Expo project, is that right? So I don’t need to expo install expo-updates and configure it myself do I? I’m confused because expo-updates is not in my package.json so it feels like I need to install it, but in some places in the docs it also reads like it works ‘out of the box’.

I’d really appreciate a little advice!

Thanks

Never mind. Apparently there’s just a fairly long delay after publishing an update. I tested again 12 hours later and the background update worked.

Hi

The update is available as soon as expo publish finishes.

You generally have to restart the app (which will check for updates), then restart it again (at which point it will start using the new bundle). So if you restart the app, wait for a bit to give it time to download the update and then restart again you should see the update.

If you install expo-updates you can manually check for updates (e.g. when a user clicks a button) and you can also e.g. provide a “restart now” button after the updated bundle has finished downloading.

Thanks for explaining that and for the help. Much appreciated :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.