The difference between version and build of IOS

Source: Internet
Author: User

What's the difference between a version, a build, and a set of versions?

In iOS (as in Android and other projects), there are two version, one is Cfbundleversion ("Bundle Version"), which is the version we see, The other is cfbundleshortversionstring ("Bundle version string, short"), which is the build we see.

Under normal circumstances, we only use version can be set to "1.0", "1.1", "2.0", etc, but if you want to use two version number, you need to set the build to three-to-one ... etc. increment integer, what is the use?

Version we can see through the app Store, itunes or other software, it's for the user, and build is what we use internally in team development, only we can see it ourselves. For example, when the team intends to release version 1.0, a lot of builds will be released for testing or QA teams to test, you have released a lot of build, because you have been modifying the code, so when you receive a bug message, how do you know that the build caused the problem, this time the build version number can reflect Here it comes

The current run version information can be obtained from the bundle version in the Info.plist file:

Nsdictionary *infodic = [[NSBundle mainbundle] infodictionary];

Cfshow (Infodic);

You can output it yourself and see what cfshow prints.

The following code is if you want to show the user in the UI to see the version of the code, compare whether the upgrade is also through version comparison, not build, but also with the following code

NSString * appversion = [[NSBundle mainbundle]objectforinfodictionarykey: (NSString *) Kcfbundleversionkey];

The difference between version and build of IOS

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.