Member-only story
Swift 5.1 Takes Dependency Injection to the Next Level
How to use Swift 5.1 Property Wrappers to cut your dependency injection code in half.
Swift 5.1 brings many new features to the language, and several of them promise to revolutionize how we write and structure our Swift code.
This article will discuss Swift Property Wrappers and demonstrate just one way they can be used to dramatically simplify your code.
UPDATE: The following article has been updated to reflect changes in Swift 5.2.
Some Background
Modern software development is an exercise in managing complexity, and one of the ways we attempt to do that is via architecture. Architecture, in turn, is really just a term used to describe how we break complex software down into easily digestible layers and components.

So we follow the rules and break our software down into simplified components that can be easily written, do just one thing (SRP), and can be easily tested.
Once we have our pile of parts, however, we have to wire everything back together again to form a working application. Figures.
Wire things together the right way, and we have a neat structure formed from a loosely coupled set of components.