Has anyone found a way to merge changes in Xcode project or Core Data model files?
Asked Answered
L

2

2

Is there a way to use a VCS (I'm using git) and have it work with merges to the Xcode files? For example, if my co-worker adds a new Group to the project, when I merge in his changes, I get the Group merged in?

Or if he adds an attr to a Core Data entity, I get that attr in my Core Data model?

Limacine answered 24/11, 2009 at 18:58 Comment(0)
P
4

Core Data and nib files don't merge well.

Xcode project (project.pbxproj) files generally do, with one exception: when two team members both add files to the same project group. Then they both tend to collate on the same line in the project file and cause a conflict. In the vast majority of cases, accepting both edits one after the other (order is irrelevant) results in a successfully merged file.

Potsherd answered 24/11, 2009 at 20:29 Comment(1)
Has anyone ever built a tool to xlate these files to/from some reasonable format for merge?Limacine
E
0

The easiest solution to merging the pbxproj file is using Xcode's FileMerge Utility as described here:

https://mcmap.net/q/219838/-how-to-merge-conflicts-file-project-pbxproj-in-xcode-use-svn

Basically FileMerge already knows how to do it for you, so celebrate :) You don't even need to select which parts to merge, it already knows. I would assume since the pbxproj file is always such a huge problem, but FileMerge knows how to merge it, the same will most likely apply to Core Data and xib files as well. Although I have never personally ran into that issue.

Euroclydon answered 27/3, 2013 at 20:34 Comment(3)
You recently posted a large number of answers like this across multiple questions, which all seemed to be advertising your linked answer. These were being flagged by the system and by other users, and many of them were not addressing the actual question being asked. As a result, these answers have been removed. We prefer that answers be crafted to the specific needs of each question asked. Your original answer was a good one, and this seems to be appropriate to what's being asked here, so I've left these alone. I did mark at least one of the questions as a duplicate of the first you answered.Hipolitohipp
@BradLarson thanks for the heads up. I wasn't trying to spam anyone, those are just all the answers i found while trying to solve my problem, which are all similar but only offer a solution directed at using a git repository, i was only trying to help others find a generic solution.Euroclydon
for some reason marking other questions as possible duplicates didn't even occur to meEuroclydon

© 2022 - 2024 — McMap. All rights reserved.