Question: how to check if incoming OTA update has newer RuntimeVersion

  1. SDK Version: 45
  2. Platforms(Android/iOS/web/all): iOS + Android

Hello! We would like to force all app updates on the user, both OTA and native-updates. The OTA updates we’ve handled without problems, but is there some expo-compatible way of checking if there is a new native build available? We’ve tried to check on the incoming OTA if it requires a higher runtime version than the current native shell supports, and implement some logic around that, like:

      const update = await Updates.checkForUpdateAsync()
      const updateRuntimeVersion = update.manifest?.runtimeVersion
      const currentRuntimeVersion = Constants.manifest?.runtimeVersion

      if (updateRuntimeVersion > currentRuntimeVersion) {
        // some logic asking the user to update app

But update.manifest is always undefined.

Is there some way of checking on the incoming update which runtime version it has? Or some other expo-friendly way of knowing if there’s a native update available?

In general, the updates service should only send you updates that your app binary can handle, so this won’t be a reliable way to check to see if there is an update available in the app store.

One possible way to solve this problem would be to have some server side API endpoint you create that lists out the latest version available in the App Stores, and when you successfully complete a rollout of the new binary to the stores, you manually update what the server sends for that. Then your app could make a request to that endpoint, compare the version to itself and see if it needs an update.

There may be other ways to do this, and you could also possibly make some kind of cron job that would update the data this API sends back.

Hi @dj_icebear

In addition to what @ccheever said, I found the following that seem worth a look:

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