Stretching defines between source & plist

Discussion in 'Mac Programming' started by zeppenwolf, Aug 22, 2010.

  1. zeppenwolf macrumors regular


    Nov 17, 2009
    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.
  2. larkost macrumors 6502a

    Oct 13, 2007
    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.

Share This Page