You are currently browsing the archives for the Cocoa category.

Posted on March 4, 2010 at 7:35 am

Get Application Name

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: The breakdown is as follows: NSBundle mainBundle creates a bundle object [...]

Posted on March 4, 2010 at 6:48 am

Get Application Icon Name

The line of code below is a slight modification that shows how to get the name that will appear on the iPhone below the icon: The CFBundleDisplayName value corresponds to the Bundle Display Name in the application plist file, see the figure below: You can see the application icon for this example in this figure: