How does Apple make the info.plist display its “Information Property List”?

后端 未结 1 1613
南笙
南笙 2020-12-18 11:28

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 ipho

相关标签:
1条回答
  • 2020-12-18 12:28

    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.

    0 讨论(0)
提交回复
热议问题