How to get the name of the running application in iOS

Jonathan picture Jonathan · Nov 30, 2011 · Viewed 49k times · Source

If the application name under the icon on the home screen is "My Awesome App" how do you get that string within the application at runtime?

Answer

David Dunham picture David Dunham · Nov 30, 2011

I’d try

[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"];

although presumably you know your own app’s name and can just use it…