2

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?

Milen
  • 8,697
  • 7
  • 43
  • 57
Nick Turner
  • 927
  • 1
  • 11
  • 21
  • I have also traded putting "INFOPLIST_FILE=Staging-Info.plist" and just have different plist files instead of combining them in the xcconfig, but the xcconfig is not making the app use my custom plist. just ignoring the line com pletely – Nick Turner Jul 30 '13 at 16:09

1 Answers1

0

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

Nick Turner
  • 927
  • 1
  • 11
  • 21