Checking the ‘.plist’ file for errors and bugs. This post will help you when you want to add or edit data inside the .plist file, which gives an error message: ‘The data couldn’t be read because it isn’t in the correct format.’

Terminal

Suppose you are from the iOS Design and development community. In that case, you may already be familiar with using Apple’s list, i.e. Property List file functionality, whereby you store your data in an XML file type (Apple’s list file format).

Adding 1,000 lines of code in the list file is painful, so what you do is copy and paste through the source tab.

But if you have done something wrong with the structure of the .plist file, you will get an error something like this

plist error in xcode ios app development

ERROR: ‘The data couldn’t be read because it isn’t in the correct format.’

So, to solve this error, you can take the following steps:

Step 01:
Go to Applications Folder > Utilities > Open Terminal App

Step 02:
I assume you stored your faulty .plist file in the Desktop folder. So type this code in the Terminal App to change the directory to Desktop.

cd ~/Desktop

Step 03:
Now assume your faulty .plist’s file name is something like this file-name.plist

So now type the following command, and the Terminal App will show an error with the line number. This will finally help you rectify your mistake and make the .plist file valid for your iOS App Development Xcode project.

plutil file-name.plist
Hope it helps,

Thanks & Regards
Mandar Apte

Published by Mandar Apte

Mandar is a Mumbai-based multi-disciplinary designer with UX/UI, Logo, Symbol, and Brand Identity design expertise. He currently runs his Mudrkashar Linguistic Apple iPhone, iPad, and Mac app business in the heart of Mumbai city.

Leave a comment

Leave a Reply