Is there a way to force Xcode to trim trailing whitespaces when I save file?
I\'m using version 3.1.3 if that matters.
For Xcode 8, I installed the swimat Xcode plug-in, for formatting Swift code, which removed all trailing spaces and whitespace-only lines.
Install via homebrew-cask:
brew cask install swimat
Download the App directly:
https://github.com/Jintin/Swimat/releases/download/v1.3.5/Swimat.zip
Clone extension
branch and archive to Mac App.
Once installed, you can run Swimat in Xcode via Editor -> Swimat -> Format
.