version, which is commonly said, is the identity that the app uses to advertise the user's description. Generally there are 2-segment or 3-segment, for example: 2.1,8.1.2
Version is generally determined by the product department, completely different updates need to change the major version number, such as QQ4.0 changes are very large, the major version of the changes will be more appealing to the user's eye, so some applications will frequently update the major version number, such as Firefox 20.0. The two-part version number includes both the minor feature update and the bug fix, and the three-segment version is basically a new feature addition and a big bug fix, and the third paragraph indicates that the stable version is basically fixing the bug.
Build, which refers to a unique compilation identifier, usually an incrementing integer (Android Force is a number, iOS can be a string)
Build is for internal use and is used to determine a unique version. There is not much contact with the version mentioned earlier.
In iOS development, these 2 numbers can be any number or string.
The situation we are currently experiencing is:
1. version or build ignored.
2, reversed version and build.
Getting a method is also simple:
Nsdictionary *info = [[NSBundle Mainbundle] infodictionary]; // Version NSString *appversion = [info objectforkey:@ "cfbundleshortversionstring"]; // Build NSString *buildversion = [info objectforkey:@ "cfbundleversion"];
Why use a version number
1. Convenient marking and communication
The earlier mention of version number update will have a positive effect on the promotion. So the version number is not too long, if like this "we solemnly launched a certain 1.7.14.19257!", this will make users feel very dull and like TV shopping, but also not conducive to the spread. If it is "XXX 3.0, very different!" may result in better communication.
2. Easy to track bugs
A Bug in an application is certain, but a quick fix to the problem reflects the ability of the team and the programmer. We often meet developers who say I submit a version, but the download is still old. When we helped him solve the problem, he couldn't figure out which one was, and if he could show the current version in a place like "about", it would be easy to find the problem.
Or a colleague of the Test team, there may be several different versions of the branch in hand that are tested, and they need to accurately describe a beta version.
Automatically change Build number
As mentioned earlier, Version it is not necessary to automatically change, according to the needs of the product or marketing department, timely manual change is good
Talking about iOS version number