Xcode - How to make it use different plist file for same code base, different targets

9.6k Views Asked by At

I have a code base that I need to build out to two different targets. The only difference is they read different config.plists, config-1.plist for target #1 and config-2.plist for target #2. What do I need to do in the building to achieve this?

1

There are 1 best solutions below

2
On BEST ANSWER

Like this:

  • Select your project from the navigator to the left
  • Select the target you want to change (under TARGETS)
  • Click "Build Settings"
  • Search for "Info.plist"

In the Packaging section, you should see a setting called Info.plist file.

  • Change that to you "config-2.plist" or whatever you want.

You also need to create the two plist-files of course.