Convert Property List (plist) Between Binary and XML Formats - Online Free Computer Tutorials.

'Software Development, Games Development, Mobile Development, iOS Development, Android Development, Window Phone Development. Dot Net, Window Services,WCF Services, Web Services, MVC, MySQL, SQL Server and Oracle Tutorials, Articles and their Resources

Monday, June 18, 2012

Convert Property List (plist) Between Binary and XML Formats

If you have ever opened a plist file outside of Xcode using a text editor and ran into something that you find output as you are now expecting and when what you really wanted was something like XML format. The solution is actually 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

You just need to convert plist to XML and after making changes, you need to convert it back to plist.

I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too. 

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


No comments:

Post a Comment