• Explicit type declaration ❌ let a = [“aab”, “b”, “c”] ✅ let a: [String] = [“aab”, “b”, “c”] • Use precomputed value ❌ if number == 30 * 30 { // do something } ✅ if number == 900 { // do something } • Avoid nil-coalescing and ternary operator (although I like to use them) • Declaring functions private or fileprivate • Declaring non inheritable classes final • Breaking complex functions
Changing few flags in build settings of Xcode Project • Build Active Architecture Only → set to YES for debug • Build Options → DEBUG INFORMATION FORMAT is set to DWARF • Swift Compiler — OPTIMIZATION LEVEL → to -Onone • Set user defined flag to SWIFT_WHOLE_MODULE_OPTIMIZATION to YES
not dependent on each other. • Using tools to generate projects on demand with only the requested module. • Making it easier for the developer to generate code using these tools - written script to generate and reset the project • Tools used • XCake (Deprecated) • XcodeGen How did we further reduce the build time?