Skip to content


To add credit information to Cocoa app’s “About”

Create a RTF format text file, with TextEdit maybe 🙄 and it will be much easier to save it somewhere else and then import into your Xcode project folder (Add Files to ….). Fyi, I have tried to create the file directly from Xcode, but it is corrupted somehow.

And just with proper file naming (Credits.rtf), the content in the file is automatically populated to the “About” button, as shown below. Yup, there’s quantum physics involved in here, definitely 🤔

Chronology of Cocoa app

When the process is started, it runs the NSApplicationMain function, which creates an instance of NSApplication. The application object reads the main NIB file and unarchives the objects inside. The objects are all sent the message awakeFromNib. Then the application object checks for events.


When it receives an event from the keyboard mouse, the window server puts the event data into the event queue for the appropriate application. The application object reads the event data from its queue and forwards it to a user interface object, such as button, and your code gets triggered. If your code changes the data in a view, the view is redisplayed. Then the application object checks its event queue for another event.

This process of checking for events and reacting to them constitutes the main event loop.

When the user chooses Quit from the menu, NSApp is sent the terminate: message. This ends the process, and all your objects are destroyed.

(from Cocoa Programming for Mac OS X by Big Nerd Ranch)