Michael Long
Oct 12, 2021

--

Nice article. Your sample for container-based injection is good, but should probably mention that there's a lot more that you can do with it in regard to scopes, caching, and so on.

I also did a version of Antoine's property wrappers that requires a lot less boilerplate for each registration, allows for mocking and testing, and still supports caching. See the demo project at https://github.com/hmlongco/InjectableDemo.

Thanks for mentioning Resolver.

--

--

Michael Long
Michael Long

Written by 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.

No responses yet