The Swift Dependency Injection Series

Articles on Factory and Resolver in particular, and Dependency Injection in general.

Michael Long
2 min readJan 7


Photo by Timothe Courtier on Unsplash

I’ve written quite a few articles on Dependency Injection, ever since I created Resolver back in 2018. So I decided to create this list to gather them all up into one handy reference.

Note that articles marked with an asterisk (*) are recommended reading.

Note that development of Factory 2.3 is underway. If you’d like a peek at what’s coming, or if you have suggestions or recommendations, then checkout the Factory repository.


Factory is my latest open-source dependency injection library, and a successor to Resolver. Factory is fast, lightweight, and compile-time safe.

Swift: High Performance Dictionary Keys — NEW

I improved Factory’s dictionary lookup performance by over 500%! Can you do the same in your app?

Swift: Unit Testing Fatal Errors — NEW

Or how I reached 100% code coverage in Factory.

Factory: Circular Dependency Chains

How to find and eliminate them

Factory: Multiple Module Registration *

How to initialize everything before anything is initialized.

Swift: Unit Testing Factory

Creating a library? Make sure that it’s correct. And that it stays that way.

Factory: Swift Dependency Injection *

A new approach to an old problem.


Resolver was my first open-source dependency injection library, and won an Open Source Peer Award from Google in 2021.

Using Resolver? Check In!

Just curious where my dependency injection system ended up…

Dependency Injection

Articles on various dependency injection tips and technqiues.

Functional Dependency



Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.