Reputation: 6588
Is there a way to configure global default build settings, or even to share some settings among multiple projects?
Example 1: i downloaded Xcode 4.2 and want to change ARCHS_STANDARD_32_BIT setting back to the old "armv6 armv7" value without having to change all projects. I want to be able to easily change it back once we decide we don't need to support old devices anymore.
Example 2: i have some settings, like warnings to ignore or optimization parameters, and want to share them in all the projects which build the libraries i'm going to link together to get my final product, and every time i want to change one of them I want to avoid worrying over whether or not i forgot to change settings for each of the targets.
Upvotes: 3
Views: 2555
Reputation: 19641
Your best option is to use Xcode configuration files. They are text files with build settings NAME = VALUE
. Example:
ARCHS = armv7 armv6
Create a new one using "Configuration Settings File" template. Populate it with copy/paste from build settings.
You can have a configuration file for each build configuration at three levels:the build configuration (Debug for instance), the project and the target. This way you can split your settings in several files and reuse them a lot.
Google Toolbox for Mac project uses this technique a lot. Check its examples.
I don't find a good reference in Xcode 4 documentation. Check Basing a Build Configuration on a Configuration File.
Upvotes: 3