Detailed example of IOS obtaining app version number
When I look at the code, I see a sentence for obtaining Version number of plist file
labelVersion.text = [NSString stringWithFormat:@"v%@", [[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString*)kCFBundleVersionKey]];
I’m interested in the latter parameter kcfbundleversionkey, which turns out to be CFBundle H has been set to a good attribute, and the following is the comment of this attribute
const CFStringRef kCFBundleVersionKey;
/* The version number of the bundle. For Mac OS 9 style version numbers (for example "2.5.3d5"), */
/* clients can use CFBundleGetVersionNumber() instead of accessing this key directly since that */
/* function will properly convert the version string into its compact integer representation. */
There are also many standard info beginning with kcfxxx Plist keys attribute. If you are interested, you can take a look at CFBundle h. Study their usage,
The above is a simple example of IOS obtaining app version number. There are many articles on IOS development on this site. You can refer to them. Thank you for reading. I hope it can help you. Thank you for your support to this site!