Question

I have a user defined variable called "ENVIRONMENT"

I have a plist with this entry

Environment = ${ENVIRONMENT}

in my xcconfig:

ENVIRONMENT=Dev

I also set the configuration file for the project to see my xcconfig file.

I know this part works because it creates my ENVIRONMENT variable in the user defined area for my target.

So I run this line in my app delegate did finish launching:

NSLog(@"Env = %@", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"Environment"]);

How can I use the xcconfig file to set a value on main plist file for the project?

Was it helpful?

Solution

I went to the target with the A made from pencils. Clicked duplicate and to build a copy. Set the configuration for each sub target created and it works

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top