How to know which line of plist file is incorrect

MichK picture MichK · Mar 19, 2013 · Viewed 16.5k times · Source

I generate plist file for my application from file in csv format.

Everything seems to be correct but when I try to build application or open plist file in XCode i Get an error informing that:

mydata.plist:0: error: reading plist: The data couldn’t be read because it has been corrupted.

File contains a lot of data so it might be hard to manually find line which is incorrect.

Is it possible to validate file and get information which line is incorrect?

Answer

murat picture murat · Mar 19, 2013

Try running the following command in Terminal:

plutil <PATH_TO_FILE>

It will tell you what the problem is and give you the line number.