I have just noticed, that if you have an .plist file in your Xcode project (it does not matter whether it is the Info.plist file or other - in my case it was other .plist file) and you edit the file as a source code file (right-click on file Open As->Source Code File) and then you switch back to XML property List (right-click on file Open As->XML Property List), make some changes and save, then all your formatting and comments are dropped when you open it again as a source code.
Does anyone know how to deal with such behaviour? Do I have to stick editing the file as source code ALWAYS?
Xcode seems to believe that the <comment>
tag corrupts the data. It will also strip out XML-style <!-- comments -->
when viewing the plist in Xcode.
It seems that a string entry, e.g.
<key>Comment</key>
<string>My comment</string>
is the only way to reliably persist the comments.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With