In Xcode, I had gotten quite used to creating plists
to store simple arrays of static data.
However, in Xcode 4 I can't figure out how to change the default root type of a plist
from Dictionary
to Array
.
Just one of many frustrations I've been having with Xcode 4. Does anyone know how to do this?
Just right-click the .plist file and open file as source code. Now we will be able to see the xml file.
Replace the <dict/>
to <array/>
. Now build the project once. Things will be all right.
My technique: create a new row, set its type to array, put the items you want in the root array in it. Cut the array, then you have an empty plist. Then paste, and you have an array with root type of Array, with the items from the array you created.
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