Macos – Where do OSX applications typically store user configuration data

installationmacos

I've noticed on OSX, installation is frequently a drag and drop one file kinda deal. I assume that file is an archive of all the applications necessary bits and that the application runs directly from it. Where does the application store configuration data, particularly per user settings when there are multiple users? On Windows, this type of stuff might go in the registry under HKLU or HKLM, or in the Application Data folder for the user or for all users.

Best Solution

In /Users/username/Library/Preferences. You also see some stuff being placed in /Users/username/Library/Application Support.

Both of these folders have corresponding global locations outside /Users, namely under /Library. These however seem to be used very little by applications as such, for obvious reasons.

The format of the preferences for OSX-native applications are usually .plist (property-list) files with a name given in reverse-domain name syntax. There is a standalone application called Property List Editor which allows you to view and edit such files. (I think it's part of the XCode/developer-tools download.) Of course there's nothing to prevent you from using your own preference storage system, and naturally applications that are mostly cross-platform will tend to do this, but the preferences should nevertheless be placed in the /Users/username/Library/Preferences directory.

Edit: If you're writing software for the Mac and you're using the Cocoa framework, then Apple has this document for the part of the Cocoa API that deals with storing and retrieving preference settings: User Defaults Programming

Related Question