Re: Info.plist
Re: Info.plist
- Subject: Re: Info.plist
- From: Fritz Anderson <email@hidden>
- Date: Mon, 27 Jun 2005 08:47:47 -0500
On 27 Jun 2005, at 4:41 AM, email@hidden wrote:
I'm having problem to set environment variables in the "Info.plist"
configuration file of my C++ application build with XCode. I have
stored the attached "Info.plist" file in the "Contents" folder of
my application bundle but the application does not seem to have
find variable "TEST_ENV_KEY" when using the stdc function getenv.
Other environment variables that are set in the ".MacOSX/
environment.plist" configuration file of the user can be retrieved
properly by my application. What am i missing?
Info.plist does not set environment variables. There is no way to
attach environment variables to an executable file in Mac OS X. You
can attach environment variables to an executable when it is launched
from Xcode, but you can't attach them for general launching.
If you want to retrieve a value from Info.plist, look at
CFBundleGetValueForInfoDictionaryKey(), or the equivalent method in
NSBundle, objectForInfoDictionaryKey:.
In general, it would not be a good idea to put parameters in the
Info.plist file; that's not what it's there for. Put a dictionary in
a separate plist file, include it in your resource build phase, find
it with the CFBundle or NSBundle API, and read it.
-- F
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >Info.plist (From: "email@hidden" <email@hidden>) |