Is there a good way to use NIB (or XIB) files when working with branches?
When I try to do this, most of the time the merging of topic branches does not really work. Autogenerated IDs change very frequently and all over the place, which provokes conflicts. The changes in the XIB are not human-parsable, so the manual merging does not work, either.
How do you deal with this issue? Is there some non-obvious technique, or do you avoid branches that contain Cocoa UI elements? Should one completely exchange/replace XIB files using a different name, if they are changed in a branch, as a workaround?
I haven't seen a solution I'm satisfied with yet. Short lived branches and focused nibs containing a minimum number of objects help avoid conflicts but that's not a full solution. The best I can offer is to try to enforce a clear separation of concerns in your nib contents so that unrelated edits don't edit the same file. I end up loading a number of view via UINib as a result but haven't found that to be a problem and it makes reuse of views across the app easier too.
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