Sign in to confirm you’re not a bot
This helps protect our community. Learn more
How to Implement Dependency Injection In iOS [Swift 5, iOS 12, Step-by-Step]
232Likes
5,829Views
2021Jul 5
Check out my eBook - Ace The iOS Interview (https://aryamansharda.gumroad.com/l/t...) iOS Checklist: https://github.com/aryamansharda/iOS-... Today, we’ll look at one of the most important patterns in modern iOS development - dependency injection. Dependency injection is just a fancy term for the idea that if you have an object that relies on things to function, that object should receive those dependencies as input and should not be in charge of creating those dependencies itself. We know that one of the main goals when developing software is to create classes and components that are loosely coupled and flexible. Dependency injection enables us to do just that. The other main advantage of dependency injection is how testable it makes your codebase. Dependency injection makes it very easy to replace an object's dependencies with mock objects which make unit tests easier to set up and allows us to isolate behavior. We'll cover initializer, property, and method injection. Blog Post: https://digitalbunker.dev/ Twitter:   / aryamansharda  

Follow along using the transcript.

Aryaman Sharda

4.01K subscribers