What does this file hold and how important is it to keep it "correct"?
I've seen people write scripts to just merge any change dealing with it and I've heard others merging it manually every time.
What is the correct way to handle it and why?
This file holds the list of all the files in the project, settings of targets and which files belong to which targets. It's probably the meatiest file in project bundle. You should not ignore this file.
Data file created by Xcode, a development application for Mac OS X; saves project data such as the list of source code and resource files and the build properties; also saves the Group data, which organizes the resource files in a virtual folder hierarchy.
pbxproj contains all of the metadata about your project that Xcode uses to build it; the settings, the file references, configuration, targeted platforms, etc... I.e. it is a critically important.
The project.pbxproj contains all of the metadata about your project that Xcode uses to build it; the settings, the file references, configuration, targeted platforms, etc...
I.e. it is a critically important.
There really isn't a great answer for this. Typically, teams will avoid conflict by limiting edits to the project to one team member at a time.
The Xcode team has put a lot of effort into making the file merge-friendly. In managing several large projects via svn, I've generally found that the merges are automatic and painless.
Until they aren't. And when they aren't, revert, merge changes by hand (i.e. make the changes in the project that conflicted), and move on.
Try my script xUnique. What it does:
project.pbxproj
to JSON formatobjects
in JSON and give every UUID an absolute path, and create a new UUID using MD5 hex digest of the path
children
, files
, PBXFileReference
and PBXBuildFile
list and remove all duplicated entries in these lists
sort_pbxproj
method in xUnique.py if you want to know the implementation;sort-Xcode-project-file
, with some differences in ordering PBXFileReference
and PBXBuildFile
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With