I'm working with source code that is frozen and cannot be changed; but its ENV aware and expects changes through the ENV. The source code is being used in an Xcode 4/iOS project.
Xcode 3 allowed us to set environmental variables on the app in the Executable folder (see Figure 1 at iOS Debugging Magic). Xcode 4 appears to lack the 'executable info' that was present in Xcode 3.
I've looked through a number of similar questions on Stack Overflow, but no one has answered the questions. Answers usually degenerate to preprocessor macros. Confer: How to set environment variables in iPhone executable using XCode 4?, Conditional Environment Variables in Xcode, and Where to set environmental variables in ios?.
How does on set an app's environment variables in Xcode 4?
In the Settings window, under Related Settings, click Advanced system settings. On the Advanced tab, click Environment Variables. Click New to create a new environment variable. Click Edit to modify an existing environment variable.
Create an environment variable in a solution. Sign in to Power Apps (make.powerapps.com), and then on the left pane select Solutions. Open the solution you want or create a new one. On the command bar, select New > More, and then select Environment variable.
Select Start > All Programs > Accessories > Command Prompt. 2. In the command window that opens, enter echo %VARIABLE%. Replace VARIABLE with the name of the environment variable you set earlier.
You can set environment variables via Xcode Schemes. To edit a scheme, select it in the top bar:
Choose the Run mode and go to the Arguments tab, and there you go...
By default, these settings are also used for the Test and Profile modes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With