Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unity 3D: What is the Android Bundle Version and Version Code and how do they relate?

Tags:

a) What does the Android bundle version and version code denote?

b) What is the difference between the bundle version and version code?

i) Suppose I have a bundle version of 0.137, how does the version code relate to this? Can the version code just be 137?

ii) What happens when I release bundle version 1.0 next? Can I just call the version code 10?

c) How do they relate? What's the right way to number the bundle versions?


N.B. There does not seem to be a source that explains the difference, in search. I have been very haphazardly numbering my bundles till now, but I'd like to figure out how to do this right.

These designations appear to be specific to Unity, but I am not sure if I understand what the parameters are about even from that page...

like image 989
ina Avatar asked Mar 15 '12 13:03

ina


1 Answers

There's no "bundle version". That's an iOS/Mac term. Built Android apps are called packages.

Android has two places where a version is specified: version name (android:versionName in manifest) and version code (android:versionCode). They don't have to be corellated, but in practice they usually are. Google Market uses version code (not name) when you publish an update to make sure your update is later than the package currently published.

The version name is what the end users see. There's no limitation on its format; it's a free-text string, although the vast majority of apps stick to 1.2 or 1.2.3 patterns.

The way you corellate version name and version code is up to you. You can go with sequential version codes, or you can use a major*10000 + minor*100 + build formula - that's what Google does with their apps, so that v. 4.10.3 would have code 41003.

like image 147
Seva Alekseyev Avatar answered Sep 21 '22 12:09

Seva Alekseyev