Stop spending more time resolving merge conflicts in .pbxproj

Praveen Kumar
Mac O’Clock
Published in
3 min readJan 23, 2021

--

If you working in a large team and your team is working on a multiple new modules, then you know the pain of resolving conflicts in Xcode project file each time you add new files to your project. I have been through this many years and finally I came across a tool named XcodeGen, in this article will look how this tool is helpful resolving our problem.

A bit of background

Every Xcode project has settings file .pbxproj contains all of the metadata about your project that Xcode uses to build it; the settings, the file references, configuration, targeted platforms, etc... This file is very important to compile, build and archive your project. When ever you add new folders, files, modify project settings, build phases this file get modified. It’s quite possible to get conflicts in this file when you raise pull request. This file is not human friendly to read and resolve conflicts and length of the file is depend on size and complexity of your project. What normally I do is I will resolve conflicts with theirs and add my files and modifications again. But this is a tedious manual process, and error prone, even time consuming some times.

What XcodeGen will do to solve this problem

XcodeGen is a command line tool written in Swift that generates your Xcode project settings file using your folder structure and a project spec. So you can add your .pbxproj files to git ignore. So that no more merge…

--

--