The error "error: unable to read property list from file:..." occurred for "Preprocessed-Info.plist" file while XCode building

XCode 10.3

The error below occurred while XCode building when you set YES to Preprocess Info.plist File of "Build Settings".

"error: unable to read property list from file:<Preprocessed-Info.plist file path>" error: The operation couldn't be completed. (XCBUtil.PropertyListConversionError error 1.)

Cause of this error

We can use plutil for check what's wrong in "Preprocessed-Info.plist" file.

$ plutil -lint Preprocessed-Info.plist
Preprocessed-Info.plist: Encountered unexpected character k on line 33 while looking for close tag

This means line 33 of "Preprocessed-Info.plist" has no close tag of XML. Actual line 33 of the file is below.


Why this occurred?

The article below describes about this error. When the plist file include URL, preprocessor identify // of URL is begging of comment line. So following characters are ignored.

How to resolve it

As describes about article above, you can avoid this error by set -traditional to Info.plist Other Preprocessor Flags of "Build Settings".


When you set -traditional to Info.plist Other Preprocessor Flags, you cannot use // for comment line in the file Info.plist Preprocessor Prefix File.
If you use it, those lines are added top of plist file then build error occurred. You have to use /* */ for comment mark in the plist file.