Search code examples
xcode4.5

Xcode 4.5 - trailing whitespace


Latest release of Xcode (4.5) is supposed to strip trailing whitespace from source files.

But when I save a file with some spaces at the end of a line they're still there.

What am I missing?


Solution

  • OK, here's what the problem was.

    Xcode will not trim trailing white space if you add a white space at the end of the line, leave the cursor at the end of that line and then save it.

    You need to move your cursor off that line and then save it.

    May be some conflict between saving the position of the cursor whilst simultaneously trimming the whitespace perhaps?