macOS Library Directory Details
The Library
directories are where the system and your code store all of their related data and resources. In macOS, this directory can contain many different subdirectories, most of which are created automatically by the system. In iOS, the app installer creates only a few subdirectories in ~/Library
(such as Caches
and Preferences
) and your app is responsible for creating all others.
Table A-1 lists some of the common subdirectories you might find in a Library
directory in macOS along with the types of files that belong there. You should always use these directories for their intended purposes. For information about the directories your app should be using the most, see The Library Directory Stores App-Specific Files.
Subdirectory | Directory contents |
---|---|
| Contains all app-specific data and support files. These are the files that your app creates and manages on behalf of the user and can include files that contain user data. By convention, all of these items should be put in a subdirectory whose name matches the bundle identifier of the app. For example, if your app is named MyApp and has the bundle identifier Resources required by the app to run must be placed inside the app bundle itself. |
| Contains programs that assist users in configuration or other tasks. |
| Contains audio plug-ins, loops, and device drivers. |
| Contains app-specific autosave data. |
| Contains cached data that can be regenerated as needed. Apps should never rely on the existence of cache files. Cache files should be placed in a directory whose name matches the bundle identifier of the app. By convention, apps should store cache files in a subdirectory whose name matches the bundle identifier of the app. For example, if your app is named MyApp and has the bundle identifier |
| Contains resources for picking colors according to a certain model, such as the HLS (Hue Angle, Saturation, Lightness) picker or RGB picker. |
| Contains ColorSync profiles and scripts. |
| Contains system bundles and extensions. |
| Contains the home directories for any sandboxed apps. (Available in the user domain only.) |
| Contains plug-ins for extending system-level contextual menus. |
| Contains data files with web browser cookies. |
| Contains data used by Xcode and other developer tools. |
| Contains language dictionaries for the spell checker. |
| Contains documentation files and Apple Help packages intended for the users and administrators of the computer. (Apple Help packages are located in the |
| Contains device drivers and other kernel extensions. |
| Contains aliases to frequently accessed folders, files, or websites. (Available in the user domain only.) |
| Contains font files for both display and printing. |
| Contains frameworks and shared libraries. The |
| Contains plug-ins, libraries, and filters for web-browser content. |
| Contains keyboard definitions. |
| Specifies the agent apps to launch and run for the current user. |
| Specifies the daemons to launch and run as root on the system. |
| Contains log files for the console and specific system services. Users can also view these logs using the Console app. |
| Contains the user’s mailboxes. (Available in the user domain only.) |
| Contains plug-ins for the System Preferences app. Developers should install their custom preference panes in the local domain. |
| Contains the user’s preferences. You should never create files in this directory yourself. To get or set preference values, you should always use the |
| In the system and local domains, this directory contains print drivers, PPD plug-ins, and libraries needed to configure printers. In the user domain, this directory contains the user’s available printer configurations. |
| Contains QuickLook plug-ins. If your app defines a QuickLook plug-in for viewing custom document types, install it in this directory (user or local domains only). |
| Contains QuickTime components and extensions. |
| Contains screen saver definitions. See Screen Saver Framework Reference for a description of the interfaces used to create screen saver plug-ins. |
| Contains scripts and scripting resources that extend the capabilities of AppleScript. |
| Contains system alert sounds. |
| (Deprecated) Contains system and third-party scripts and programs to be run at boot time. (See Daemons and Services Programming Guide for more information about starting up processes at boot time.) |
| Contains web server content. This directory contains the CGI scripts and webpages to be served. (Available in the local domain only.) |
Copyright © 2018 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2018-04-09