How to know which line of plist file is incorrect

2019-01-30 11:36发布

问题:

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?

回答1:

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.



回答2:

Open plist file in Chrome browser gives the error line number.



标签: ios plist