We use clang-format to automatically format our Objective-C code. If you're going to be contributing more than a few one-off patches, then to reduce the time it takes to reveiw code, we suggest installing clang-format as an Xcode plugin and have it format your code whenever you write to disk.
You can install clang-format via Brew by running
scripts/install/install_clang_format
.
You can install Travis Jeffery's clang-format Xcode plugin by following his installation instructions.
Once you've installed it configure it in Xcode:
Edit > Clang Format > File
to use MDC's particular clang-format configuration file.Edit > Clang Format > Use System ClangFormat
to ensure that you're using the same version of clang-format as we are.