Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS App Store bundle version comparison rules

We are going to upload new version of our app to iOS App Store.

For previos version CFBundleShortVersionString was "1.9.2" and CFBundleVersion was "1.92.0". For current version we are going to use CFBundleShortVersionString:"1.10" and CFBundleVersion:"1.100.0".

But we afraid if App Store won't detect our 1.10 version as new. Won't it be recognized as older than previos version with CFBundleVersion:"1.92.0".

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

Does anybody know how Apple compare CFBundleVersion parameter of uploaded builds?

Thank you for the answers.

like image 466
Sergei Avatar asked Dec 01 '25 14:12

Sergei


1 Answers

Yes, 1.100.0 is > 1.92.0. Apple uses semantic versioning.

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

For your example, the check goes something along the lines of (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
}

A good resource for how semantic versioning works is 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
like image 97
Dan VanWinkle Avatar answered Dec 04 '25 06:12

Dan VanWinkle



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!