The Service Locator Pattern in Swift
Avoid Dependency Injection entirely!
2 min readOct 2, 2020
--
The service locator pattern is designed to encapsulate the processes invovled in obtaining a service with a strong layer of abstraction.
Prerequisites:
- You will be expected to be aware how to make a Single View Application, or a Playground to run Swift code