Search code examples
xcodegitcocoapodsxcode5.1

Why is the project format with Xcode 5.1.1 from Plist to XML?


You can see how the project format shown in this image goes from Plist format to XML between these branches in Git which doubles the file format which becomes a conflict quite often when merging branches. Something appears to be changing it from Plist to XML format. This project does use CocoaPods so perhaps that is a factor. I am using CocoaPods 0.33.1.

I tested running CocoaPods which is the only way the app is modified beside Xcode though I did not see it changing the project when I run pod install.

Any ideas on how the project files might be changed from Plist format to XML?

enter image description here


Solution

  • By default Cocoapods generates the XML format. This causes many issues with diffing or with version control, as the format is completely different than the Plist format that Xcode uses natively.

    There is an easy fix, which is to install the xcproj utility.

    This can easily be done with homebrew, if you have that installed:

    brew install xcproj
    

    After it is installed, Cocoapods will convert the project file to the Plist format after processing.

    For more info, see this entry in the Cocoapods Wiki : https://github.com/CocoaPods/CocoaPods/wiki/Generate-ASCII-format-xcodeproj