Xcode "Unable to parse the contents of Info.plist"

I just hit a brick wall with xCode, not wanting to parse my Info.plist file. I replaced the file several times with older (identical) versions of the file that I previously backed up and I still get the same error.

Here is the complete error message:

couldn't parse contents of '/Users/...Info.plist': The data couldn't be read because it isn't in the correct format. 

I do not know that. I am using xCode 5.0.1, Mavericks

+21
xcode compiler-errors plist
Oct 28 '13 at 18:12
source share
9 answers

It seems like replacing the file with a backup, and deleting data for a project in Organizer was a cure. Hope this helps someone even later.

+2
Oct 28 '13 at 18:19
source share

This is one of the best ways to determine which line the error occurs on.

Just go to the directory where the plist file is present and write this command on the terminal →

 plutil filename.plist 
+44
Sep 10 '15 at 6:40
source share

Another cause of this problem might be trying to put the urls (actually just a slash, etc.) in your app-Info.plist.

Work around this by simply raising the -traditional flag inside the Info.plist Other Preprocessor Flags parameter in the project build settings.

enter image description here

+9
Jan 13 '14 at 10:50
source share

I personally destroyed the file when git merge conflicts occurred .. plist is an XML file and the git conflict is added <<<and → → there to mark the differences.

Locate the .plist file in Finder (in one of your project folders). Open it in a text editor, find lines that do not look like valid XML, delete them and be sure to delete the duplicated XML / node line (due to the recorded changes before and after git).

+2
Feb 25 '15 at 13:38
source share

I think you used source control tools, you can use the main text editing tool without Xcode to open this plist, the + F command to find "<<<<<<or" → →> ", then you, you'll probably find an error string, for example:

 <<<<<<< .mine >>>>>>> .r605 

select the correct line and delete another, the error will be resolved!

+2
Oct 28 '16 at 2:51 on
source share

When created for iOS, Info.plist may be corrupted whenever the Default Orientation setting is set to Auto Rotate. The Info.plist file is created correctly in the first assembly, but subsequent assemblies lead to ...

 <key>UIInterfaceOrientation</key> <string></string> </string> 

... at this point, Xcode cannot complete the project.

+1
04 Feb '14 at 22:49
source share

I had the same error and realized that the problem was that I had a URL (e.g. http://example.com/something ) as the value in my Info.plist and I just turned on preprocessing for it (without -traditional ). Apparently, Xcode will process // as a comment marker and omit the rest of the line.

The workaround I found is to span the pre-processor, for example: http:/${}/example.com/something , which breaks // by placing an empty substation in the middle of the line, so it doesn't look like a comment to Xcode, and after preprocessing it back to the regular URL.

0
Sep 09 '14 at 22:53
source share

I had the same error, according to the @Vizllx method, still an error. Then I use Sublime Text to open info.plist, finding that there is a code conflict.

-one
Mar 31 '17 at 8:26
source share

The best way to identify a mistake is to open it in an XML editor, and you know where everything goes wrong.

-one
Oct 27 '17 at 6:21
source share



All Articles