Skip to content

Instantly share code, notes, and snippets.

@aokj4ck
Created June 1, 2011 15:22
Show Gist options
  • Save aokj4ck/1002534 to your computer and use it in GitHub Desktop.
Save aokj4ck/1002534 to your computer and use it in GitHub Desktop.
Retrieves the application name and version number which are set in info.plist
static NSString *getAppNameAndVersionNumber() {
NSString *number = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"];
NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"];
NSString *nameAndVersion = [NSString stringWithFormat:@"%@_%@", appName, number];
return nameAndVersion;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment