Xcode Interfce Builder changes files to open, causing SCM to report them as modified

Does anyone have a problem with Xcode IB showing xib files as modified just opening them? Although there really were no changes?

If I just want to look at the user interface of the xib file, this action causes Xcode to show the file as changed, and then I have to undo the changes and much more.

Any ideas?

+7
source share
2 answers

This usually happens if you open the .xib file that was generated / used by a previous version of Xcode.

This can happen for a variety of reasons. For example, with newer versions of Xcode, it will update the version number of the Interface Builder contained in .xib with the one you are using. Other examples include differences in the classes used to create the user interface from xib. He has not documented what he is doing, but take a look at the difference to make sure.

Ultimately, this is a problem with Xcode, and in fact it is not so easy to resolve. You can:

  • Commit the changes, although this may foul your diff. If your team does not use earlier versions of Xcode than you, this should not cause a problem. (If they are, make sure you are all in the latest version).
  • Keep resetting the changes made to the xib file, or select not to commit the file.
+7
source

Xcode 4.5 has changed the format of .xib files. Basically, this is the removal of unused cracks from the format. After making changes, he will no longer do this.

0
source

All Articles