Many applications allow you, as the user, to configure their behavior or appearance. Cocoa provides a simple means of storing such preferences in the user’s defaults database.
The NSUserDefaults class is your interface to the user’s defaults database. With it you can register factory defaults, set the user’s defaults, and read the defaults back out as needed. You can think of it as a very fancy dictionary.
Your application can register a set of defaults “from the factory.” These are the defaults that your application uses when users have not made their own configuration selections. These factory defaults are registered programmatically every time your application is launched.