A lightweight yet powerful dependency injection library for Swift, designed for iOS, macOS, tvOS, watchOS, and Linux.
DITranquillity is a dependency injection library for Swift that implements the dependency injection design pattern, allowing developers to decouple their application code from dependency management. It provides a declarative style for describing dependencies and supports complex scenarios like circular dependencies and modular architectures. The library is designed to work across Apple platforms and Linux, ensuring flexibility and scalability.
Swift developers building applications for iOS, macOS, tvOS, watchOS, or Linux who need a robust and flexible dependency injection solution to manage complex dependencies and improve code maintainability.
Developers choose DITranquillity for its lightweight yet powerful feature set, including support for advanced injection scenarios, Swift Concurrency, and seamless UI integration. Its focus on clarity, simplicity, and security makes it a reliable choice for managing dependencies in Swift projects without compromising performance or scalability.
Dependency injection for iOS (Swift)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports initializer, property, and method injection with modifiers like optional, tagged, and many, as detailed in the core features documentation.
Manages complex scenarios such as circular dependencies and delayed injection, which are explicitly covered in the core injection docs.
Provides built-in support for Storyboards, StoryboardReferences, and simple subviews/cells injection, simplifying dependency management in UIKit-based apps.
Fully compatible with Swift Concurrency, ensuring async/await support, and works across Swift versions 3.0 to 6.0 on multiple platforms.
The dependency graph visualization feature is marked as planned but not yet implemented, limiting debugging and graph analysis capabilities.
Cocoapods is unsupported from version 5.0.0, forcing users to switch to SwiftPM or Carthage, which can disrupt existing workflows.
The declarative style and advanced features require more upfront configuration and understanding compared to simpler DI libraries, as seen in the detailed setup examples.