I'm currently working with a couple of Xcode workspaces. The goal of the workspaces is to allow one version be built with prebuilt versions of the dependency projects while other one will be built with all the dependencies as projects.
Say we have main project A. And that A has dependencies B and C. We have two workspaces that contain the following projects.
Workspace 1: A.xcodeproj B.xcodeproj
Workspace 2: A.xcodeproj B.xcodeproj C.xcodeproj
For Workspace 1, A and B exist as projects but C would be treated as a prebuilt framework. For Workspace 2, A, B, and C exist as projects. In other words, A and B are debuggable in Workspace 1 whereas A, B, and C are debuggable in Workspace 2.
The goal is to be able to have these 2 (or more) workspaces in such a way that building does not result in having to first modify any of the existing project files.
I have this working by way of a Build Phase which copies an xcconfig
file which "configures" A's Build Settings. This Build Phase is done with another project file which which I'll call Bootstrap.xcodeproj
. This project file contains the Build Phase which copies the xcconfig
and also has A as the Build Target defined in it's Scheme. What I notice is that regardless if Parallel Builds is on or off, sometimes Bootstrap is run before or after A. And even if run before A, the Build Settings don't always get updated.
This is noticeable if I build Workspace 1 and then Workspace 2. When building Workspace 2, the first build will fail because it is still using the xcconfig
from Workspace 1.
Seeing if anyone knows of a way to get Xcode to re-update Build Settings from xcconfig
dynamically or better orchestrate this.