Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The difference between version and build under Identity

In XCode in Targets General properties under Identity group I have Version and Build, with new project both contain the same "1.0" value.

I've changed it to be: Version x.y.z e.g. 1.0.0 and in Build i'm using integer that is reset to 1 on each version change.

Is it correct? I've found, when I prepared Ad Hoc distribution, that iTunes displayed the value from build as Version which confused me, am I using those fields correctly?

like image 678
Lukasz 'Severiaan' Grela Avatar asked Dec 11 '22 05:12

Lukasz 'Severiaan' Grela


1 Answers

Short version :

  • iTunes used the build number for identifier. However people will see the version number
  • the new build number must be larger than the build number previously submitted. You can increment build number forever or put in the build number field a combined build number and version number and reset the build number to 0. Example: version 1.0.0, build number 1.0.0.100. version 1.0.1, build number 1.0.1.1.

Long version :

From apple documentation https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/ConfiguringYourApp/ConfiguringYourApp.html

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.”

From this thread 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.

More info from this thread 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

like image 59
Yuandra Ismiraldi Avatar answered Dec 21 '22 11:12

Yuandra Ismiraldi