在 XCode 的 Targets General 属性中,Identity 组下有 Version 和 Build,新项目都包含相同的“1.0”值。
我已将其更改为:版本 x.y.z 例如1.0.0 和 Build 我使用的整数在每次版本更改时都重置为 1。
是否正确?我发现,当我准备 Ad Hoc 分发时,iTunes 将构建的值显示为版本,这让我感到困惑,我是否正确使用了这些字段?
最佳答案
简短版:
- iTunes 使用内部版本号作为标识符。但是人们会看到版本号
- 新的内部版本号必须大于之前提交的内部版本号。您可以永远递增内部版本号,或者在内部版本号字段中放入内部版本号和版本号的组合并将内部版本号重置为 0。示例:版本 1.0.0,内部版本号 1.0.0.100。版本 1.0.1,内部版本号 1.0.1.1。
长版:
The version number is a two-period-separated list of positive integers, as in 4.5.2. The first integer represents a major revision, the second a minor revision, and the third a maintenance release. The version number is shown in the store and that version should match the version number you enter later in iTunes Connect. For details on possible values, see “CFBundleShortVersionString” in Information Property List Key Reference.
The build string represents an iteration (released or unreleased) of the bundle and can contain a mix of characters and numbers. For Mac apps, the user can click the version number in the About window to toggle between the version number and the build string. For details on possible values, see “CFBundleVersion” in Information Property List Key Reference.
For iOS apps, update the build string whenever you distribute a new build of your app for testing. iTunes will recognize that the build string changed and properly sync the new iOS App Store Package to the device. For how to configure your app for testing, read “Beta Testing Your iOS App.”
来自这个线程 Which iOS app version/build number(s) must be incremented upon App Store release?
the CFBundleShortVersionString should match the version number you give iTunes Connect. It is also the version number that appears when the user looks at your App in the App Store.
The version number is shown in the store and that version should match the version number you enter later in iTunes Connect.
The CFBundleVersion is not displayed in the App Store, but is used by the iTunes to determine when your App has been updated.
If you update the build string, as described in “Setting the Version Number and Build String,” iTunes recognizes that the build string changed and properly syncs the new iOS App Store Package to test devices.
来自此线程的更多信息 Version vs build in XCode 4
Many developers start the Build number at 0, and every time they build they increase the >number by one, increasing forever. In my projects, I have a script that automatically >increases the build number every time I build. See instructions for that below.
Release 1.0.0 might be build 542. It took 542 builds to get to a 1.0.0 release.
Release 1.0.1 might be build 578.
Release 1.1.0 might be build 694.
Release 2.0.0 might be build 949.
Other developers, including Apple, have a Build number comprised of a major version + minor version + number of builds for the release. These are the actual software version numbers, as opposed to the values used for marketing
关于ios - Identity下version和build的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23955298/