updates on-the-air on bare workflow project

I created an expo project using expo init then I eject this project and I added some native code.
I signed and deployed my app to play store manually using react-native CLI by generating an .AAB file and upload it to play store .
now my app has some real users and I want to integrate expo-updates to my app to use updates on-the-air. so I am confused how can I achieve that and I don’t want to mess things up ???


It is not that hard.
Basically, all you need to understand is this points:

  1. expo-updates module is getting JS bundles from hosted by expo CDN. Your native code is not included there.
  2. You can do OTA updates only for JS - any other native change (even something small like changing push icon) requires from you to rebuild your native app and push it to the store.
  3. If you want to implement expo updates, you first action will be configuring it by docs for your bare project (but if i recall correctly, it is configured by default if you ejected from expo managed workflow). After you configured it, you have to rebuild app and then test it with some test release channel.
  4. After all things tested and ready, you have to push it to store for you users to update app. And after they update app, it will be possible for them to get OTA updates of JS code.

I think you can do little cheat in your case: check if expo updates already configured (it should be by default) and try to do expo publish action with something little and invisible for users (maybe some invisible button or absolute 1px point on screen) and check changes in production app

hi, @egorzotov thanks for the reply.
I did what you suggested and it works perfectly now but the updates use the old JS bundle for the first launch. then in the next launch, the new update comes , same thing when I clear the cash of the app.
I am using expo 39 SDK.

In theory, setting fallbacktocachetimeout to a higher value should cause it to use the new version, as long as it is downloaded within the timeout.

thanks, @wodin for the reply
i think that makes sense , I am using the default value 30s so should increase it ??

I have not tried changing that value. Give it a try.