How to know which line of plist file is incorrect

2019-01-30 10:47发布

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?

标签: ios plist
2条回答
别忘想泡老子
2楼-- · 2019-01-30 11:42

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

查看更多
爷的心禁止访问
3楼-- · 2019-01-30 11:43

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.

查看更多
登录 后发表回答