Created
July 29, 2013 04:15
-
-
Save danmartyn/6102115 to your computer and use it in GitHub Desktop.
Returns the app name, version and build number
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