Yesterday I was asked at job interview which style guide I use for Swift. I don’t know which one. I don’t know even which exist. I definitely use some because I can’t refrain from fixing function call to trailing closure syntax or to add space before opening curly brace. The question is what’s the name of style guide I use. I started to google to name swift style guides available.

  1. Google’s Swift Style guide which is based on Apple’s Swift standard library style. Now I know which style guide I use: Apple’s Swift standard library style. Or one required by default by swiftlint tool.

  2. The Official raywenderlich.com Swift Style Guide.

  3. Linkedin Swift Style Guide.

  4. Coursera Swift coding guidelines. Wow, it’s so short!

And that’s it!

Swift.org has API Design Guidelines, which should be mentioned here.

A book Swift Style: An Opinionated Guide to an Opinionated Language by Erica Sadun should be mentioned. But because the book is of 2017 and style itself is not available without buying a copy of book, this doesn’t count.