I want to change order in plist file not programmatically but from xcode. Is there a way in Xcode where i can sort by value? I simply want to arrange it for myself. For now if i want add new item it will always goes to tail.
How to sort it ? To 100 value go to the top?
plist file. If you need to edit these items, Control-click (or right-click) Info. plist in the sidebar and select Edit Manually. This allows you to add or edit items in raw XML format.
Info. plist - The primary property list for Mac OS X applications, located in the /Contents/ directory of an . APP bundle. To view this file, right-click an application file, select "Show Package Contents," and open the Contents folder.
Here is the (mildly infuriating) answer, at least in the case of Items in a Settings.bundle's plist, which I realize was not the OP's situation.
To arbitrarily reorder items in a plist:
Here's a demonstration in Xcode 9.2.
As if that's not already super confusing…
Preference Items, Vertical Drag
You can drag and drop vertically (i.e., without entering the Key column), but only if your goal is to move the item to be first in the list.
Apple Clearly Knows How to Do This
Once you open an Item, elements within it can be dragged and dropped exactly as you'd expect.
Wat!? Yeah. This doesn't need to be so painful, but it's likely to remain this way unless folks get up in arms which, once you know the workaround, it's hard to do. But in case you're feeling sufficiently incensed, make your voice heard: http://bugreporter.apple.com. (Fwiw, here's my Open Radar.)
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