Apple - Trouble opening plist files in text editor

plist files are not necessarily plain text so they need to be run through a converter. Finder and Xcode (which has a plist editor) do this without telling the user

The binary format is documented in this C code so any application can convert it and someone has written a format description in English and more Apple documentation here but note that it references old paths in /Developer/Documentation

The command line program plutil can convert to and from XML

e.g. to view a binary property list in XML format on stdout:

plutil -convert xml1 -o - <file name>

Also to convert a binary to a XML plist in place and then leave it so that the user program can read either.

plutil -convert xml1 <file name>

You can also edit plist files with PlistBuddy, which is a command-line program.

PlistBuddy is located at /usr/libexec/PlistBuddy.


Since you mentioned Sublime Text, there is now a plugin you can use which automatically does the conversion for you:

https://packagecontrol.io/packages/BinaryPlist

Tags:

Xml

Macos

Plist