iOS App Store bundle 版本比较规则

标签 ios app-store uploading

我们将把新版本的应用程序上传到 iOS App Store。

对于以前的版本,CFBundleShortVersionString 为“1.9.2”,CFBundleVersion 为“1.92.0”。对于当前版本,我们将使用 CFBundleShortVersionString:"1.10"和 CFBundleVersion:"1.100.0"。

但我们担心 App Store 不会将我们的 1.10 版本检测为新版本。 CFBundleVersion:"1.92.0"不会被识别为比以前的版本旧吗?

换句话说,CFBundleVersion:"1.100.0"会高于 CFBundleVersion:"1.92.0"吗?

有人知道 Apple 如何比较上传版本的 CFBundleVersion 参数吗?

感谢您的回答。

最佳答案

是的,1.100.0 > 1.92.0。 Apple 使用语义版本控制。

从左到右,只要没有一个数字小于新数字,就可以。

对于您的示例,检查的内容类似于(伪):

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
}

关于语义版本控制如何工作的一个很好的资源是 http://semver.org

示例:

  • 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 bundle 版本比较规则,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27405913/

相关文章:

ios - ScrollView 中的多个图像

iphone - Cydia 和 AppStore 中的 iOS 应用

android - 有没有办法让我的客户访问我为他们提交的应用程序的销售报告?

html - Grails没有方法签名:org.apache.catalina.core.ApplicationHttpRequest.getFile()

iOS 归档时发现意外的 Mach-O header 代码 : 1918975009

ios - 单击时将 TableView 单元格编号传递到另一个 View ,一开始始终为 null

ios - NSURLSession 后台 session 中的 NSURLSessionDownloadTask 出错

ios - 等待上传

android - 对于大型 Assets 文件夹 'Uploading apk to device' 每次都花费太长时间

ftp - 上传到 z/OS 的文件中出现意外的换行符