Created
August 28, 2013 07:22
-
-
Save RavisMsk/6363045 to your computer and use it in GitHub Desktop.
Method for getting current app version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSString *)appNameAndVersionNumberDisplayString { | |
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; | |
NSString *appDisplayName = [infoDictionary objectForKey:@"CFBundleDisplayName"]; | |
NSString *majorVersion = [infoDictionary objectForKey:@"CFBundleShortVersionString"]; | |
NSString *minorVersion = [infoDictionary objectForKey:@"CFBundleVersion"]; | |
return [NSString stringWithFormat:@"%@, Version %@ (%@)", | |
appDisplayName, majorVersion, minorVersion]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment