Swift Coding Style

23
Swift Coding Style by Akira Hirakawa, Burpple github.com/akirahrkw

Transcript of Swift Coding Style

Swift Coding Styleby Akira Hirakawa, Burpple github.com/akirahrkw

Team Dev?

Rules? Conventions?

our story is… (early this year)

• I was the only iOS engineer in our team

• I also needed to do server side

• We use Swift for new Classes

• We were planning to work with 1~2 engineers from Silicon Straits Saigon

• 60%: server side, 40% iOS (kind of PM role)

but

our concerns are…

• We haven’t met the engineers

• We haven’t communicated well

• We don’t know how they code

• We haven’t used outsourcing before

What we want …

• readable code

• extendable code

• standardised code

• minimise the time of PM

Swift is flexible

if no rules

!!!Chaos!!!

Style and Conventions Guide!!

github.com/burpple/swift-style-guide

but

We are lazy!!

We need automation!!

github.com/realm/SwiftLint

SwiftLint

• enforces Swift style and conventions

• hooks SourceKit to use AST of your code

contributing

Demo

• We are improving our coding guide

• Automation is better than manual

• if you like, please give us your feedback

Thanks:)

https://github.com/burpple/swift-style-guide

https://github.com/realm/SwiftLint

Q?