Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change plist root type to Array in Xcode 4?

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?

like image 987
Keller Avatar asked Mar 29 '11 19:03

Keller


2 Answers

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.

like image 194
Govind Avatar answered Oct 04 '22 11:10

Govind


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.

like image 38
Jesse Avatar answered Oct 04 '22 12:10

Jesse