Swift2Go
Published in

Swift2Go

DI using struct Dependencies {}

Photo by Maxwell Nelson on Unsplash

Dependency Injections has many flavours depending on which team you join, and new ways are often being introduced. While I do not claim to have something shockingly new, I’ll share with you how I solved my Dependency Injection (DI) for an inherited code base with poorly defined dependencies.

For the curious, the following articles explore alternative ways of solving this challenge and may very well be more…

 by the author.

--

--

--

a place where Swift Developers share knowledge.

Recommended from Medium

Xcode Scheme, Environment, Project Configuration Setup Recipe

Use VSCode for iOS (Swift) Development on macOS

TEXTFIELD FLUTTER | A BRIEF

Detect Face Movements With ML Kit

Swift Concurrency — Async Function

Gradient in SwiftUI

Supporting AirPods in your iOS and tvOS media Apps

Automatically Create Initializers for Classes on Xcode

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Dave Poirier

Dave Poirier

Senior iOS Software Developer at CAE

More from Medium

Implement OAuth2 PKCE in Swift

Create Layered Dependency Injection With Swift Property Wrappers

Design Code for Unit Testing

Retriable API Calls with Modern Swift

Retriable API Calls with Modern Swift