【问题标题】:What is the accepted string format for CFBundleVersion and CFBundleShortVersionString in iOS?iOS 中 CFBundleVersion 和 CFBundleShortVersionString 可接受的字符串格式是什么?
【发布时间】:2021-07-03 12:07:05
【问题描述】:

我正在查看CFBundleVersion和CFBundleShortVersionString的官方文档,其中提到了以下内容:

字符串只能包含数字字符 (0-9) 和句点。

但是,我几乎可以将任何我喜欢的字符串添加到本地的 plist 文件中,并将应用程序部署到物理设备上。说上述限制只会在 AppStore 视图期间强制执行是否正确?

但后来,我看到了一些带有字母字符的公共应用程序(例如https://apps.apple.com/mx/app/gasoapp/id1190356107,然后点击Historial de actualizaciones)。

我的问题是,这些键的可接受格式是什么?

【问题讨论】:

    标签: ios xcode app-store versioning info.plist


    【解决方案1】:

    一旦您将应用上传到 App Store Connect,CFBundleVersion 和 CFBundleShortVersionString 就会得到验证。如果它们的格式不正确,Apple 将立即拒绝该构建,并且它将无法用于 TestFlight 或实时部署。

    最终用户首先看不到这两个值。测试人员可以在 TestFlight 中看到它,但您所指的值是您在 App Store Connect 中设置的版本字符串。那是面向客户的,可以是任何 64 位字符串。大多数开发人员只是简单地“重用”他们的 CFBundleVersion,但也有其他人如何使用更具描述性的名称,例如“2021 Spring Release”、“2021.01.04”或类似名称。

    对于 CFBundleVersion 和 CFBundleShortVersionString,我建议遵循 Apple 的 1.0.0 等示例。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-15
      • 1970-01-01
      • 1970-01-01
      • 2010-10-20
      • 2011-04-04
      相关资源
      最近更新 更多