How to set up file compare/diff in Xcode 4?

Xcode4

Xcode4 Problem Overview


Am looking for how to set up file compare/diff in Xcode 4, but have run into brick wall. Anyone can tell me how to do it?

Xcode4 Solutions


Solution 1 - Xcode4

If you're looking for comparing two different files (instead of comparing two versions of the same file), you can use the FileMerge tool included with Xcode. Spotlight can find it for you.

Solution 2 - Xcode4

Richard Brightwell's answer is correct, although it threw me a bit as there is a step missing.

  1. Select the file from project navigator then click the version editor button (top right).
  2. Click the timeline icon between the two files to display a vertical bar representing the revisions (black bar with white indicators for each revision).
  3. Drag the white arrows to the versions to compare.

XCode 4 Compare Utility

Solution 3 - Xcode4

There is a button above the code window that looks like two file folders inverted one over the other. Click that button to open a side by side view of your file differences.

It's the far right button in the red box drawn on this screenshot.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionpdenlingerView Question on Stackoverflow
Solution 1 - Xcode4zhengyueView Answer on Stackoverflow
Solution 2 - Xcode4Jason GeorgeView Answer on Stackoverflow
Solution 3 - Xcode4Richard BrightwellView Answer on Stackoverflow