---
title: "Discussion on \"Dependency Injection in Swift\" | Hashnode"
description: "Discussion on \"Dependency Injection in Swift\". Dependency injection means giving an object its instance variables. Really. That's it. - James Shore (Author of \"The Art of Agile Development\")"
url: "https://hashnode.com/posts/dependency-injection-in-swift/5ff35dc5e8e57e1374e67ec3"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Dependency Injection in Swift](https://manivelnagarajan.hashnode.dev/dependency-injection-in-swift?utm_source=hashnode&utm_medium=feed)

Dependency injection means giving an object its instance variables. Really. That's it. - James Shore (Author of "The Art of Agile Development")

Jan 4, 2021 · 5 min read · manivelnagarajan.hashnode.dev  
Updated Jul 28, 2022  
Read the article

-   [#swift](https://hashnode.com/tag/swift)
-   [#unit-testing](https://hashnode.com/tag/unit-testing)
-   [#tdd](https://hashnode.com/tag/tdd)
-   [#ios](https://hashnode.com/tag/ios)
-   [#dependency-injection](https://hashnode.com/tag/dependency-injection)

## Written by

[Manivel Nagarajan](https://hashnode.com/@manivelnagarajan)

@manivelnagarajan · Chennai, IN

  
[View profile](https://hashnode.com/@manivelnagarajan)

Lead iOS Engineer at Freshworks

I'm a software engineer, committed to practicing software craftspersonship and deliver apps that are clean, scalable, testable, and maintainable. Swift, Objective C, Unit testing, JavaScript, Node.js, Express.js, React.js, SQLite &amp; MongoDB

## Responses 2

Markdown supported · ⌘↵ to post

[Sandeep Panda](https://hashnode.com/@sandeep)

[Jan 9, 2021](https://hashnode.com/posts/dependency-injection-in-swift/5ff35dc5e8e57e1374e67ec3/comment/5ff96f0aa538d00135154409)

Hey [Manivel](https://hashnode.com/@manivelnagarajan), great piece. I am dabbling with swift once in a while and this is very helpful. I have also shared it with some of my friends. Thanks for writing and would love to read more from you.

[Revanth Kausikan](https://hashnode.com/@RevanthKausikan)

[Jan 6, 2021](https://hashnode.com/posts/dependency-injection-in-swift/5ff35dc5e8e57e1374e67ec3/comment/5ff51037fc8177134fbb5e00)

Covered a powerful concept in a very simple yet effective way.

Was really helpful, Thanks!

[Manivel Nagarajan](https://hashnode.com/@manivelnagarajan)

[Jan 6, 2021](https://hashnode.com/posts/dependency-injection-in-swift/5ff35dc5e8e57e1374e67ec3/comment/5ff51037fc8177134fbb5e00#reply-5ff5497bfc8177134fbb5fcb)

Thank you, Revanth!
