I participated in projects that did this before using the following layout:
* app-workspace * App.workspace * library [submodule] * Library.xcodeproj * library sources * app [submodule] * App.xcodeproj * app sources
In this way, the workspace is aware of design and assembly schemes. The git workspace repository knows about submodules containing projects.
In practice, this requires a lot of effort in order to update the definitions of submodules at the top level, so we usually worked on the main branches of submodules. The transfer of certain versions to the workspace submodules occurs when important changes are added: it is not too rare if the CI system is built from a top-level project.
Of course, for unit tests, you can specify the CI in each submodule yourself, these are only integration tests that will require the entire workspace. The important step to remember here - and the one I sometimes messed up with - is that you should only update the definition of the submodule to a specific commit after you have pushed this commit to a common source of CI repositories and developers. If you forget about it, you risk breaking the control over other people when the parent project refers to fixing a submodule that they donβt have.
The place where potential issues with interacting with Xcode can potentially occur is to define your build schemes. The approach I recently made was to use the schematic editor to define the schemas that I want to use as general (instead of each user), and defined in the workspace at the top level, and not in projects in submodules, after that and those schema definitions, that were taken to git, turn off automatic schema creation. Now all your developers and the CI system all agree on how to create your product.
user23743
source share