HomeTechnologyNewsWhat is a PLIST file?

What is a PLIST file?

- Advertisement -

If you’ve used a Mac or developed apps for the iPhone or iPad, you’ve probably come across a PLIST file at some point. But what is it and what does “PLIST” mean anyway? We explain it to you.

It is a property list file

A PLIST file is a special text file that contains data in property list format. macOS, iOS, and iPadOS apps use the file to store settings and other data in a key-value format with an XML structure. For example, every iPhone app includes at least one PLIST file called Info.plist that contains basic configuration information for the app.

Ordinary users who download an iPhone app never see or have to directly interact with this file, but developers must create one for their app to work. PLIST files can be created and edited with a text editor, such as TextEdit. They are normally stored in the ~/Library/Preferences/ folder on a Mac, but it can also be stored anywhere in the file system.

The PLIST-format

The property list format contains a series of XML-encoded key-value pairs. Keys are always strings, and values ​​can be strings, numbers, arrays, dictionaries, or dates. When you open a PLIST file in a text editor, it looks like a jumble of data. However, the data is actually organized in a format that is easy for computers to read.

Here is a simple example of a PLIST file:

Newt Masterson


In this example, the file contains three key-value pairs. The first pair has a key of “Name” and a value of “Newt Masterson”. The second pair has a key of “Age” and a value of 43 (an integer). The third pair has a key of “Children” and a value of an array of strings. Arrays and dictionaries can contain other arrays and key-value pairs. This allows you to store data in a hierarchical format.

How to edit PLIST files

On a Mac, PLIST files are often used to store application preferences on the ~/Library/Preferences/ folder or within an application package, but sometimes in other locations as well. For example, him com.apple.TextEdit.plist The file contains the preferences for the TextEdit application (located in ~/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/ ).

When you open the TextEdit app, it reads the com.apple.TextEdit.plist file and loads the preferences. If you make any changes to the preferences within the application, such as changing the font size, those changes are saved back to the PLIST file.

A programmer programming a bug.
Africa Studio / Shutterstock

Warning: Manually editing PLIST files is dangerous unless you know exactly what you’re doing. If you make a mistake, the app might crash and stop working properly. Before making any changes, make a backup copy of the original PLIST file that you can return to in case something goes wrong.

You can also edit an application’s PLIST file manually, but it can be very complicated depending on how a particular application writes data to a PLIST file. A knowledge of the XML structure helps. For example, if you want to change the font size for the TextEdit application, you need to open the com.apple.TextEdit.plist in a text editor or Xcode and find the key related to the font size, change the value, save the PLIST file, and then exit the editing application.

Sometimes keys aren’t listed, and in those cases it’s probably best to leave the PLIST file alone, unless you have deep technical knowledge of how the application works. Instead, change the preferences within the app itself. Good luck!

RELATED: What is an XML file (and how do I open one)?

- Advertisement -
- Advertisement -
Stay Connected
Must Read
- Advertisement -
Related News
- Advertisement -
%d bloggers like this: