How to set environment variables in iPhone executable using XCode 4?

后端 未结 3 921
迷失自我
迷失自我 2021-01-12 10:44

Since switching to XCode 4, I have been having issues finding how to set environment variables (such a NSZombies) in iPhone executables. In XCode 3, you could right-click on

3条回答
  •  情深已故
    2021-01-12 11:12

    If you want act on the value of environment variable in your own code, use the following:

    NSDictionary *env = [[NSProcessInfo processInfo] environment];
    

    Edit Scheme... / Run / Arguments / Environment is where to go to edit the environment variables for runs from Xcode.

提交回复
热议问题