Convert Property List (plist) Between Binary and XML Formats

Have you ever opened a plist file outside of Xcode using a text editor and ran into something that looked like this:

When what you really wanted was something more like this:

Beginning with Mac OS X Tiger, plist files are now stored in a binary format (versus XML).

For the most part this is transparent in your day-to-day development, however, if you use scripts or other tools to read and/or update a plist, this can be a problem.

Good news is, there is a utility to convert between binary and XML plist formats. The following will convert a binary plist file (with the name ‘Info.plist) to XML format:

plutil -convert xml1 Info.plist

Make any changes you need, and then to convert back to binary:

plutil -convert binary1 Info.plist

Comments are closed.