Cleanse
Resolver
Our great sponsors
Cleanse | Resolver | |
---|---|---|
- | 11 | |
1,769 | 2,096 | |
0.2% | - | |
0.0 | 2.8 | |
about 1 year ago | 1 day ago | |
Swift | Swift | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Cleanse
We haven't tracked posts mentioning Cleanse yet.
Tracking mentions began in Dec 2020.
Resolver
-
On using Dependency Injection with MVVM
If you're looking in to using a framework instead of doing it manually, I prefer Resolver over Swinject but both will work.
-
Popularity of unit tests with employers
But, today, I use Resolver. And recommend others also use this. There are other approaches, but Resolver is quite good. It solves this problem. "Just pass stuff in to the constructor" isn't true dependency injection anyway (but it kinda works, it's just a huge mess).
-
UIKIT Global class / environment object equivalent
You can achieve the concept as the environment in SwiftUI using protocols and Resolver https://github.com/hmlongco/Resolver
-
Dependency injection tutorial
This isn't a full tutorial, but it's a great Swift dependency injection library with lots of information in its documentation: https://github.com/hmlongco/Resolver
-
Fusion: A lightweight, @propertyWrapper based dependency injection library for Swift
I also suggest Resolver
-
MVVM + Dependency Injection
Sounds ok, and for DI I can recommend this lib, works well and easy to use https://github.com/hmlongco/Resolver/
-
SwiftUI Dependency injection
We’re using Resolver for dependency injection. Check it out: https://github.com/hmlongco/Resolver
- Add SPM dependency without exposing to clients?
- Any DI libraries for swift?
-
How to update a boolean in one view model from another view model?
Since multiple ViewModels need to access this data, I would avoid storing the data in a particular ViewModel—which should correlate only with a single, specific View—and instead implement this behavior in a third object (such as an AuthenticationService class). This way, both/any of your subsequent Views and ViewModels alike can all access that object as a single source of truth (by passing it around explicitly, putting it in the environment, or my favorite method: Resolver). Just remember to think about who should “own” data!
What are some alternatives?
Swinject - Dependency injection framework for Swift with iOS/macOS/Linux
Typhoon - Powerful dependency injection for Objective-C ✨✨ (https://PILGRIM.PH is the pure Swift successor to Typhoon!!)✨✨
Needle - Compile-time safe Swift dependency injection framework
Weaver - Dependency Injection framework for Swift (iOS/macOS/Linux)
Dip - Simple Swift Dependency container. Use protocols to resolve your dependencies and avoid singletons / sharedInstances!
DIKit - Dependency Injection Framework for Swift, inspired by KOIN.
PXGoogleDirections - Google Directions API helper for iOS, written in Swift
Locatable - A micro-framework that leverages Swift Property Wrappers to implement the Service Locator pattern
Swifter Twitter - [DEPRECATED] :bird: A Twitter framework for iOS & OS X written in Swift
Corridor - A Coreader-like Dependency Injection μFramework