Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where do OSX applications typically store user configuration data?

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.

like image 472
Rngbus Avatar asked Jan 03 '09 22:01

Rngbus


People also ask

Where do Mac apps store their data?

Application data for apps that you bought via the Mac App Store goes in your ~/Library/Containers directory (this is basically ~/Library/Application Support for sandboxed applications).

Where is user information stored on Mac?

The user and group information on a Mac are stored in Directory Services. That service can bind to external sources and alternate "local" sources like NFS, LDAP, ActiveDirectory (LDAP) but by default, unless you opt in to a directory - the user and group database is locally managed.

Where are user preferences OSX?

On Mac OS, preference files are stored in the following location: “/Library/Preferences/<program name>/” under your home directory. On the Start menu, you will find a shortcut to this folder for easy access. The full path is: “/Users/<user name>/Library/Preferences/<program name>/”.


1 Answers

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

like image 53
harms Avatar answered Nov 16 '22 00:11

harms