[1] Concept
The version number of iOS, which is called version, is called Build, and both values can be selected in Xcode and then clicked "Summary" to see. The key for version in the plist file is "cfbundleshortversionstring", which is the same as the version number on AppStore, and the key to build in Plist is "cfbundleversion". Represents the version number of build, which should be incremented by 1 after each build. Both of these values can be obtained in the program through the following code:
[[[NSBundle mainBundle] infoDictionary] valueForKey:@"key"]
[2] Concrete implementation
The code implementation obtains the Verison number of the application:
[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]
Or
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
Get Build Number:
[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]
The code in IOS gets the current version number