OTA updates versionCode not increase

How OTA works with versionCode?
As far as I know apps check the versionCode with expo published url version.
If published url > apps client, apps will download the updates.

My question is,

  1. When I published with the same versionCode then apps get update. So what variable to indicate apps will get update??
  2. If my published versionCode is higher then the apps get update, but why versionCode app client not increase?
    If I check setting > apps > versionCode still the old one.

You can see this all in the manifest (e.g., shell-app-manifest.json). There’s a revision ID (a unique, non-sequential code), publishedTime, SDK version, etc. So, publish is doing its own incrementing so your users will get the newest JS their app download’s SDK version supports.

You wouldn’t want publish to increment your versionCode. That’s a sequential number for identifying unique app builds for the app stores. You could have many publishes for a single build in the case of publishing OTA updates after publishing an app on the store. You wouldn’t see the versionCode increment after a publish because publishing does not update the app binary on your device. It just updates the JS downloaded in that binary’s data and run when you start the app.

In the case of ExpoKit, even building a new app after changing versionCode in app.json does not change the actual version code, as that number is copied over to your Android/ iOS projects as a one-time-only thing when ejecting.


Wow nice answer.
Thanks for your information.

I have other question,
If my apps (expokit) have an update, but I dont want to publish.
because that change could broken the previous apps.
So if user want the new feature they need to upgrade from playstore.
How to achieve this?

Because I build APK then i install but then JS file is change to publish version even version code in APK is larger than publish version.

This is how we do it, by integrating the build number/ version code into the release channel: Incrementing and identifying version and build - #2 by llamaluvr