0

Likely Dupe: "How to use a “private” .xcconfig in a “Shared” (git-managed) Xcode project?"

I'm running an ios project with several remote developers. Our code is checked in to a repository on github - including our xcode 5 configuration file directory and its contents ("myproj.xcodeproj") Everyone has their own version of local xcode configuration settings. The project settings are fairly complicated so I would like to keep a default version of settings that a developer can pull down when they first join the project but then I would like git to ignore the changes they make to configure for their local environment

Right now, the config files are just checked in and tracked on github. Everyone also keeps a local backup of their personal config files outside of the repository. When they pull, they can overwrite the config files that come down from github with their personal versions if necessary. Hopefully people remember not to check in their xcode project settings, but I need to deal with people who just use commit -A

I imagine this is a fairly common issue. What are the best practices for getting this done?

Community
  • 1
  • 1
ram36
  • 1

1 Answers1

0

If you want overrides of a set of defaults and to have everything in git, I would recommend using .xcconfig files for your settings. You can make it possible to select the current settings through a per-developer configuration to further separate environments.

In addition to build settings, this allows you to have separate app configurations (like server urls or api tokens) for each developer, test, release, etc.

See https://github.com/distiller/DIConfiguration for an implementation and further explanation.

z00b
  • 356
  • 2
  • 3