views:

183

answers:

2

An [ApplicationName]-Info.plist file is created with every new iPhone SDK project. My question: is it conventional to add custom property keys to Info.plist and access them programmatically or should they be created in a separate plist?

Perhaps it doesn't much matter, but using the bundle descriptor plist for my custom attributes feels dirty.

[Note that I'm not asking about user-facing properties or settings, so I'm not referring to using a Settings bundle plist.]

+1  A: 

You add them to Info.plist and then access them programmatically.

Using the bundle descriptor plist for your custom attributes isn't dirty, it's almost universal.

cdespinosa
+2  A: 

The Info.plist can contain any custom keys. See the docs:

You can include your keys in your bundle’s information property list file if you want all of your keys stored in one place.

I'm doing this for all my projects: I'm using a script to include the svnversion and build date/time in it to identify each build.

I'm using my own namespace (prefixing the keys) to avoid key name clashes.

Nikolai Ruhe
Thanks for referencing the doc. I skimmed through and then CMD-F'd for "custom" and came away empty handed. Thanks!
Justin Searls