On Apr 30, 2007, at 8:44 AM, Roland Silver wrote: Starting from a project's xcodeproj file, how do I get to the place in the project itself where the plist is specified (the plist, that is, where I stash my own preferences)? For instance, for my project called "markovx", I'd expect there to be a path <~/Library/Preferences/com.yourcompany.markovx.plist> (but there isn't), and for there to be -- SOMEWHERE WITHIN THE PROJECT ITSELF -- a specification of that path.
My question is, how do I get to see that path specification?
What is it that you're really trying to accomplish? It sounds like you're going about it in an overly-complex route. If you tell us what it is that you're actually trying to do, there may be a straightforward way to do it that you may not have considered.
There is no such path ever specified anywhere. The path is generated at runtime by the underlying frameworks that implement the preferences mechanism. It's typically generated from an application's bundle identifier, though there are ways you can request that the APIs use a different identifier. Also, when you say "the plist" and you're talking about an application, it's generally expects that you're talking about its Info.plist file, not its user defaults (preferences) database.
An application's bundle identifier is specified in its Info.plist. At build time, the target that builds that application has a build setting that Xcode's build system uses to find a "prototype" Info.plist file. Xcode's build system processes this file, potentially running the C preprocessor on it and also performing build setting substitution, and makes the result of this processing the built application's Info.plist.
Note that because the location of the prototype Info.plist file is specified by a build setting, it may not be specified or completely specified by the target itself. It might be inherited from the project that contains the target, it might be specified in an xcconfig file, it might be the result of evaluating other build settings, and so on. If a target does not directly specify its Info.plist file, the only way to have perfect knowledge of what file the Xcode build system will use is to be the Xcode build system.
-- Chris
|