Question

Does anyone know if/how I can convert a binary formatted Mac OS X plist file to a plain XML string in C#?

I know there are some plist editors for Windows available that says they support binary formatted plist files, but I need to do this inline in my own application.

Was it helpful?

Solution

I realize this is super old, but I'm posting my solution for posterity.

I couldn't find anything usable sort of launching an external process when I embarked on binary plist serialization a few weeks ago, so I had to roll my own.

For others looking for C#/.NET binary plist serialization, you can find my implementation at https://github.com/ChadBurggraf/plists-cs.

Hopefully this helps some folks out.

OTHER TIPS

a quick google reveals plutil.pl, but that will only work if perl is installed (which I'm fairly certain is not the default in windows)

I haven't tried any of the solutions below, and I know you were looking for C# but...

This page has a binary plist parser implemented in java:
http://www.java2s.com/Open-Source/Java/Swing/JIDE-Common/com/jidesoft/plaf/aqua/BinaryPListParser.java.htm

The Java Quaqua project (https://quaqua.dev.java.net/) uses a binary plist java parser. You can see the java doc here http://www.randelshofer.ch/quaqua/javadoc/ch/randelshofer/quaqua/util/BinaryPListParser.html

If you want to do the conversion in code on the OS X side, this previous SO question has your answer. Alternatively, you can use the plutil command line utility on OS X to convert between binary and XML property lists.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top