pdenlinger
pdenlinger

Reputation: 3917

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

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?

Upvotes: 56

Views: 52954

Answers (3)

Jason George
Jason George

Reputation: 7012

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

Upvotes: 38

zhengyue
zhengyue

Reputation: 1308

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.

Upvotes: 77

Richard Brightwell
Richard Brightwell

Reputation: 3012

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.

Upvotes: 2

Related Questions