Tuesday, May 04, 2010

Tip: Merging Interface Builder XIB Files Easier with Same Version Settings

Last month I posted Setting XIB Deployment & Development Targets Correctly. The article explains Interface Builder version settings in each XIB file and recommends sane settings to keep busywork to a minimum.

During a Subversion merge operation from the iTimeZone 1.3.5 branch to the trunk, I just about started to cry looking at merging the one XIB file I had changed on the branch. It was hundreds of lines of conflicts and not much had really changed. Why was their such a conflict?

Turns out that changing Deployment Target and Development Target in a XIB file dramatically restructures the XML. The large number of conflicts I was seeing, all gone once I had the inbound branch version of my XIB on the same version settings as the trunk.

This message on osdir.com explains the ongoing changes to XIB files to make them more efficient and readable. Just make sure you sync versions before doing merges.