'What version number does CodePush use to determine "target versions"?

I'm using a method of grabbing the version numbers from my src-cordova/config.xml file in order to display the version number inside my app.

Lately I've been using CodePush rather liberally with the * target. This has caused scenarios where for example a release downloaded from the App Store which was on 0.5.6, is now display (in-app at least) that the version is now 0.5.7 or 0.6 even

This is because I've released a new version to the app store in between, but users may not have necessarily have installed them, yet with the '*' targeted CodePush they are now showing as the latest version.

So a user that downloaded the 0.5.6 release from the app store, now has an app that says it's on 0.6.

But this is an illusion right? It's because when I deploy a new version it grabs the latest numbers from my config.xml and adds that to my index.html so my app can read it. But in reality that app, is still actually on 0.5.6, right?

And if I were to make a new CodePush that targeted 0.6.x, then this user would not get this update, right?

CodePush knows the real version a user has, and there's no way to change that number short of downloading the new release published to the app store, right?

Side note, is there a way to grab the REAL version number of an app using Cordova? Without inferring it from the config.xml file but rather pulling it from the App Store somehow?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source