How to reference an environment variable inside Obj-C code

Viewed 24195

I define a path variable in Xcode source tree called "MY_SRC_DIR". I would like to get the value of this environment variable and put it in a NSString in the obj-c code. For example,

-(NSString*) getSourceDir

{

    return @"${MY_SRC_DIR}"; // not the right solution and this is the question

}
5 Answers
Related