design pattern

How to implement dependency injection in Swift?

This article explains different approaches to implement dependency injection in iOS.

Efthymios Liapatis

4 minute read

One of the five design principles in S.O.L.I.D. is Dependency Inversion, where the general idea of this principle is the decoupling between the high-level modules and low-level modules. One way to apply this principle is by using the Dependency Injection design pattern. The Dependency Injection makes your code more testable, more maintainable, and of course, more readable.