简体   繁体   中英

Xcode 5 plist editor rearranges settings plist on save?

I know this was not happening before (before what I am not sure... this just began out of the blue), but I have my project's settings plist ordered in a sensible manner. It has ALWAYS remained in the order I set, through NUMEROUS edits and saves.

Now, suddenly, every time I open it, whether I make an edit or not, when I return it is scrambled, completely.

I get the Dictionaries are not ordered, etc. But what in the world (and WHY) would a text editor re-order the contents of a file??

Is anyone else experiencing this, or does anyone have any insight as to why it is happening and how to make it stop?

Dictionaries are unordered. Period. End of story. If your project's settings were displaying in a particular order, it was happenstance.

It might be that the internal format changed from XML to binary plist. Or it might be that the settings editor now loads the settings into a dictionary internally, and then uses allKeys to list the contents, rather than loading and parsing XML.

In any case, an apparent order to a dictionary is an accident of implementation, and not guarenteed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM