If you ever need to get the name of your application in code, for example, to display the application name across a navigation bar, it’s as near as the bundle for your application.
The code to get the name is as simple as this:
[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"];
The breakdown is as follows:
NSBundle mainBundle creates a bundle object that maps to the directory where the application lives.
infoDictionary returns a dictionary that contains the contents of the above bundles Info.plist
objectForKey:@”CFBundleName” will return the value for specified key, in our example, the name of the application.