Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

zeppenwolf

macrumors regular
Original poster
Nov 17, 2009
129
3
So I'm trying to get hip with using plist files for my application preferences. I notice that I'm copying my default pref values by hand into what will be the "defaults" plist file.

In my source code files, I of course use stuff like "#define kWombat (-1)", but I don't see how to do that in a plist file.

Moreover, what would really be best would be using *one* text file of defines which gets included in both places.

Can it be done relatively easily from XCode? Thx.
 
There is no such thing as a define for a plist. Rather when you are pulling in your preferences you check to see if you got anything from the preference files (note: there can be 4 of them, plus MCX settings, the system mostly handles that for you), and if you didn't get anything then you substitute your own, internally stored, default value.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.