How to setup a scalable iOS/tvOS/watchOS Xcode project for a large team and avoid code conflicts?

Amir Kamali
Mac O’Clock
Published in
4 min readAug 17, 2020

--

Developing applications with a small team of developers is easy, but in a large team this can be a challenging task in Xcode. Particularly when the code commits are frequent and feature developments can cause conflicts. On top of workflow complexities, Xcode project file format doesn’t have much support for team software development.

When developers actively contribute to the repository, such as working with UI, Storyboards, adding, removing files, etc, conflicts may happen when changing the project structure. Therefore, having a big giant project might not be a good idea as a long term solution and you might end up in ‘what the hell’ situation.

Creating multi project workspace:

If you’re starting a new project, this can be an easy task to do. Create an empty workspace and add sub projects to your workspace. Similarly, if you have existing projects you can split your codes with some refactoring to achieve the same structure.

Number of sub-projects depends on how large the team is and how frequent the features are being added. As a general rule its good to have one main application project and 3–4 sub projects to separate UI and Logics, similar to example below. After which, you can…

--

--

Amir Kamali
Mac O’Clock

Application Architect, Apple | ex. Director of Mobile & OTT at AMC Networks, ex. Engineering Manager at Tile / Life360