tschoffelen/react-native-check-version

app version doesn't update

Closed this issue · 2 comments

I updated my appstore app with a new version (1.1.6)

call the api with the current version 1.1.5
https://check-version.flexible.agency/ios/com.pennstate.wwyc/1.1.5?country=us

always return with version 1.1.5

Looking through the server code "utils.js"

const axios = require("axios");

const cache = {}

const lookupVersion = async(platform, bundleId, country = 'us') => {
  const key = `${platform}.${bundleId}`;
  let res = cache[key];
  if (res) {
    return res;
  }

Apparently, it is always returning the result with platform and bundleId. Is this expected, that the server will only register the app info once?

Hi! The cache is actually not a long-term cache, since this code runs on AWS lambda, which doesn't let any instance of the code run longer than 15 minutes. So this caching is only to catch quick subsequent requests.

In this case, it seems like the App Store metadata API is running behind. Our API is only a thin caching layer around the metadata API that basically does something like this:

curl 'http://itunes.apple.com/lookup?lang=en&bundleId=com.pennstate.wwyc&country=us' | grep version

Running that in my terminal just now it returned version 1.1.5 as the latest version as well. So it doesn't seem to be a problem in our backend, but rather on Apple's side.

I expect it to be a little delay, but let's leave this issue open for a couple of days to see if it resolves automatically.

thank you for the quick reply. I can confirm its now updated. Closing this issue.