Yes, writing Xcode editable code shows trailing spaces in Git. Going to the Xcode settings> Text Editing: Editing (tab), you can include lines only for spaces. 
Worth mentioning my current version of Xcode v5.1.
Now, what about code that is already loaded in git that complains about spaces?
Well, find 4 spaces in your editor (by default, in the Xcode settings> Text Editing> Indentation, indentation with four spaces, which can also be changed); and replace the empty line manually for those who do not have code in the line. You can also copy the paste code into another editor (for example, TextWrangler) to see if there is an empty line with only 4 spaces. "Cmd + G" is a short key to "find the next", helps with repetition.
source share