Constants.manifest.version returns undefined after OTA

Please provide the following:

  1. SDK Version: 44.0.0
  2. Platforms(Android/iOS/web/all): all
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

I’m in a bare workflow. I display the version number in my app using “Constants.manifest.version”. Whenever I do an OTA, if i modify the version number, it start returning undefined. I have to do a normal binary build to get it to show. Can i not make changes to the app config without a binary build? I’m using EAS for updates and builds. Does anyone know what’s going on here? Has anyone else run into this?

Hi @ozzy-agora, we suggest using expo-application package to use Application.nativeApplicationVersion to use for displaying the app version.

With EAS Updates, Updates.manifest is now used as a modern manifest after publishing and receiving an update.

Hi @amanhimself

Won’t that give a version number that stays the same when you the app installs new OTA updates? I think @ozzy-agora wants a way to have the version change when new OTA updates are installed.

Is Runtime versions and updates - Expo Documentation relevant to this question?

This is the same issue I am facing. We display an app version within our app, and we update that version number over OTA so we can see if users have the latest version. This works fine in classic updates, but the new manifest does not have the version number. I believe the Expo folks took out the version number because it is not “accurate”; i.e. it is not the same as the native app version number. For example, the app could be at “3.5” natively, but the version in app.json could be “3.5.2”. To be on solid ground we could show the native app version and the update UID. The problem is that it is a long string; perhaps showng the first 8 digits is sufficient.

Sorry for the late reply

Hi @amanhimself thanks for relying! @wodin is right, Application.nativeApplicationVersion will only show the native build version. If I update the app.json version for an OTA, this will not change. @next-app-admin has the same issues I do.

On OTA, i update the app.json version number for analytics. This way I can tell whether a user has the latest update or was unable to get the OTA.

runtimeVersions won’t work for me as I am on a bare workflow and runtimeVersions are update in the config, which cannot be changes in OTA.

Is there anyway around this?

1 Like

Apologies for the late reply :pray:

Michael is right about the runtimeVersions. You can specify a custom runtimeVersion, and it will be picked up by EAS Update.

Or another way you can use is by defining a constant in a JavaScript file. For example: const MY_VERSION="1.0.0". Then, you can programmatically or manually change the version when publishing.

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