用于比较 Xcode 项目文件的工具

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7176323/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 21:48:33  来源:igfitidea点击:

Tool for comparing Xcode project files

iphoneobjective-ciosxcodeversion-control

提问by cannyboy

I've been given the Xcode project files for version 1 and 2 of a iOS app. Version 1 is working, version 2 is buggy with more features. The original programmer is no longer available. No versioning system was used.

我已经获得了 iOS 应用程序版本 1 和 2 的 Xcode 项目文件。版本 1 正在运行,版本 2 有更多功能的问题。原来的程序员不再可用。没有使用版本控制系统。

Is there a tool to compare the different projects - so I can see what code was added between version 1 & 2?

有没有比较不同项目的工具——所以我可以看到在版本 1 和 2 之间添加了哪些代码?

回答by Jayprakash Dubey

You can compare two Xcode project using FileMerge tool available with Xcode.

您可以使用 Xcode 提供的 FileMerge 工具比较两个 Xcode 项目。

Below are steps for comparison in Xcode 6.1

以下是在 Xcode 6.1 中进行比较的步骤

  1. Right click on Xcode icon-> Select 'Open Developer Tool'-> Select 'FileMerge'option
  1. 右键单击Xcode 图标-> 选择“ Open Developer Tool”-> 选择“FileMerge”选项

Screenshot 0

截图 0

  1. This will open window as show below :
  1. 这将打开如下所示的窗口:

Screenshot 1

截图 1

  1. Select two Xcode project which is to be compared by clicking Left and Right button

  2. Click on 'Compare'button. This will create list of file that are added, removed or altered by comparing two Xcode project.

  1. 单击左右按钮选择要比较的两个Xcode项目

  2. 单击“比较”按钮。这将创建通过比较两个 Xcode 项目添加、删除或更改的文件列表。

Screenshot 2

截图 2

回答by Jayprakash Dubey

I'm pretty sure that nearly everything in an xcode project is stored in text files so you should be able to use standard difftools to compare the projects. This, of course, excludes resources such as images, audio, etc.

我很确定 xcode 项目中的几乎所有内容都存储在文本文件中,因此您应该能够使用标准差异工具来比较项目。当然,这不包括图像、音频等资源。

FileMergeis an app that comes with Apple's Developer tools. It does diffs and merges. It can be run through the terminal with the the opendiffcommand.

FileMerge是 Apple 的开发人员工具附带的应用程序。它进行差异和合并。它可以通过终端使用opendiff命令运行。