Difference between Version Code & Build Number?

android, ios

Solution

From documentation (emphasis mine):

android:versionCode

An internal version number. This number is used only to determine whether one version is more recent than another, with higher numbers indicating more recent versions. This is not the version number shown to users; that number is set by the versionName attribute.

The value must be set as an integer, such as "100". You can define it however you want, as long as each successive version has a higher number. For example, it could be a build number. Or you could translate a version number in "x.y" format to an integer by encoding the "x" and "y" separately in the lower and upper 16 bits. Or you could simply increase the number by one each time a new version is released.

The `versionCode` is the incremental build number in Android.

Problem

So in iOS (and most software projects...) there's an incremental build number attribute. In Android, there's a version code attribute. What is the difference between the two?

Original source