Share xcconfig files between multiple projects in a workspace

595 Views Asked by At

I have an Xcode workspace with a number of projects in it. The projects tend to have common configuration such as their swift version or iOS deployment target. I'd like to define these settings using xcconfig files.

If I create an xcconfig file in a project then I can select that config file in the project's settings and use it – as expected.

However, I've not found a way to have a single folder of config files that can be shared by all of the projects in a work space. Without this, to update a setting, I will need to update the config files for all projects which would definitely require automation to avoid being problematic.

Is there a way for projects in a workspace to share xcconfig files?

1

There are 1 best solutions below

0
On

The solution I've found to this is to add the common folder of configuration files in to each project using the import option "Create groups" and not using "Create folder reference". It seems like every project needs to have the xcconfig files in it.