iOS App Store捆绑软件版本比较规则 [英] iOS App Store bundle version comparison rules
问题描述
我们将把新版本的应用程序上传到iOS App Store.
We are going to upload new version of our app to iOS App Store.
对于previos版本, CFBundleShortVersionString 为"1.9.2",而 CFBundleVersion 为"1.92.0".对于当前版本,我们将使用 CFBundleShortVersionString :"1.10"和 CFBundleVersion :"1.100.0".
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".
但是,我们担心如果App Store无法将我们的1.10版本检测为新版本.不会被CFBundleVersion:"1.92.0"识别为早于previos版本.
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".
换句话说,是 CFBundleVersion :"1.100.0"将高于 CFBundleVersion :"1.92.0"吗?
In other words, is CFBundleVersion:"1.100.0" will be higher than CFBundleVersion:"1.92.0" ?
有人知道Apple如何比较上传的内部版本的 CFBundleVersion 参数吗?
Does anybody know how Apple compare CFBundleVersion parameter of uploaded builds?
谢谢您的回答.
推荐答案
是的,1.100.0是> 1.92.0.苹果使用语义版本控制.
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
}
示例:
- 2.0.0> 1.100.0
- 1.20.0< 1.100.0
- 1.1.0> 1.0.500
- 1.92.0< 1.100.0
这篇关于iOS App Store捆绑软件版本比较规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!