What is a package in macOS?
A macOS package (also called a macOS bundle) is a directory that appears as a single file in the Finder and Mac desktops. Example macOS packages include:
- .APP files that contain Mac applications
- .RTFD documents created by Apple TextEdit
- .DOWNLOAD files created by Apple Safari
- .PAGES, .NUMBERS, and .KEY files created by Apple Pages, Numbers, and Keynote saved in the package format
Below is a screenshot of the Spotify.app package contents:
To see an example macOS package, navigate to your Mac's Applications folder. All the APP files in that directory (such as App Store.app and Calendar.app) are macOS packages. Each APP file contains several files that comprise a single macOS application.
Other macOS file types also use a package structure. For example, RTFD documents created with Apple TextEdit contain an .RTF file and its "attachments." Apple Pages, Numbers, and Keynote automatically save documents larger than 500 MB as macOS packages. You can convert smaller iWork documents into macOS packages by selecting:
Why macOS uses packages
For the most part, macOS uses the package file structure to prevent casual Mac users from inadvertently accessing, altering, or deleting an application's components. Preventing users from accessing these files makes it less likely that they will "adversely affect the contents of [a] package," according to Apple's official developer documentation. "It prevents users from rearranging or deleting resources or code modules that might prevent an application from running correctly."
How to view the contents of a macOS package
- Locate the package in the Finder.
- Right-click the package.
- Select from the pop-up menu.
NOTE: In most cases, you should not edit or move a package's component files. Doing so may cause errors when opening the document or application.
To view the contents of an example macOS package, create an RTFD document in Apple TextEdit. Enter some text and drop a .JPG file or other image in the document and save the file. Then, locate your RTFD file in the Finder, right-click on it, and select . The resulting folder will contain both an image file and the RTF document.
How to view a macOS package in Windows
On rare occasions, you may see a macOS package in Windows. For example, if you use Parallels Desktop or another virtualization program to run Windows on your Mac, and you save an RTFD file on your Mac desktop, it will appear as a folder on your Windows desktop.
You can open and examine package contents as you would any Windows directory. If you double-click a package, such as an RTFD file, on your Windows desktop, Windows will display the folder contents in File Explorer. You can then open the individual files stored in the package.