views:

2327

answers:

1

My plists simply start with "Root". Theirs contains arrays of useful stuff you can select to tweak the configuration. The specific info.plist I am looking at is in an iphone project. I have researched this a little bit, (not alot) but haven't even detected a smell of solution.

What mechanism is putting this together? Can I bend it to my will?

To clarify, I am not referring to simply editing the plist, but using the Property List Editor to define the drop down lists in the left hand column, like Apple's info.list behaves.

Normally my plists will display in the editor with 3 columns. Key, Type and Value. Info.plist has 2, how is it setup so its behaviour is different in the Property List Editor?

This link at apple defines the keys being used in the Info.plist.

Property List Key Reference

+8  A: 

The names you see in the drop down menus in Property List Editor are provided by what Apple calls a "property list structure definition". This is an XML based file that defines specific keys and values for a particular type of property list. Property List Editor uses this to associate human readable names with particular property list keys, as well as sensible default values, type information, and so on.

Property List Editor hides the "Type" column when using a definition, because it gets the type information automatically from the structure definition. You can still use Edit > Value Type to change the type manually if you wish. You can also manually change the definition Property List Editor is using via View > Property List Type.

Xcode includes a built-in definition for Info.plist files, which is why you see the customization automatically when opening up an Info.plist file. If you're interested in how the structure definitions are defined, you can take a look in /Developer/Platform/MacOSX.platform/Developer/Library/Xcode/Plug-ins for the built-in definitions. I don't believe there's any official documentation for this format, but it's not too hard to pick up looking at the examples.

Brian Webster
Excellent, thanks!
Ryan Townshend