App Store version comparison rules for iOS

We are going to upload a new version of our application to the iOS App Store.

For prev version, CFBundleShortVersionString was "1.9.2" and CFBundleVersion was "1.92.0". For the current version, we will use CFBundleShortVersionString : "1.10" and CFBundleVersion : "1.100.0".

But we are afraid if the App Store does not detect our 1.10 version as new. Wouldn't it be considered older than the previous version with CFBundleVersion: "1.92.0".

In other words, CFBundleVersion : "1.100.0" will be greater than CFBundleVersion : "1.92.0"?

Does anyone know how Apple compares the CFBundleVersion parameter of the loaded assemblies?

Thanks for answers.

+3


source to share


1 answer


Yes, 1.100.0 → 1.92.0. Apple uses semantic versioning.

From left to right, as long as none of the numbers are less than the new one, you are kind.

For your example, the check goes along the lines (pseudo):

var oldVersionSems = "1.92.0".split(".")
var newVersionSems = "1.100.0".split(".")
var maxIndex = MIN(oldVersionSems.length, newVersionSems.length)
var isNewer = false
for (int i = 0; i < maxIndex, i++) {
    isNewer = newVersionSems[i] > oldVersionSems[i].toInt()
    if (isNewer) break
}

      



Good resource for working with semantic versioning http://semver.org

Examples:

  • 2.0.0> 1.100.0
  • 1.20.0 <1.100.0
  • 1.1.0> 1.0.500
  • 1.92.0 <1.100.0
+2


source







All Articles