-->

Check what version of the app is being used [dupli

2019-03-09 11:08发布

问题:

Possible Duplicate:
How to display the current project version of my App to the user?

Is there a way to check the version number of my app? Is it supplied somewhere once the app is in the App Store?

回答1:

I believe this is included in your info.plist file, and can be retrieved with code like this:

[NSString stringWithFormat:@"Version %@",[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]];