iOS projects have become bigger and more complex. Many projects have already surpassed desktop applications in their complexity. One important strategy to manage this complexity is through the use of unit tests. By writing tests, a developer can point out the intention of the code and provide a safety net against the introduction of bugs.

By writing tests first (test-driven development), the developer focuses on the problem. This way, they are forced to think about the domain and rephrase a feature request using their own understanding by writing the test. In addition to this, applications are written using TDD only containing code that is necessary to solve the problem.

As a result, the code is clearer, and the developer gains more ...

Get Test-Driven iOS Development with Swift 4 - Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.