Swinject
SwiftyJSON
Our great sponsors
Swinject | SwiftyJSON | |
---|---|---|
6 | 4 | |
6,178 | 22,411 | |
0.7% | 0.3% | |
4.2 | 4.2 | |
7 days ago | 12 days ago | |
Swift | Swift | |
MIT License | 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.
Swinject
-
Dependency Injection Simplified
DI is a concept which makes a class independent of its dependency management. It achieves that by decoupling the usage of an object from its creation. This helps you to follow SOLID’s dependency inversion and single responsibility principles. To achieve this in Swift one of the most appreciated library is Swinject. This library not only provides DI but also have many other features like:-
-
Awesome macOS Libraries List
Swinject - Dependency injection framework for Swift. Language: Swift.
-
SwiftUI Dependency injection
We use Swinject which is probably quite similar https://github.com/Swinject/Swinject
- Any DI libraries for swift?
- How do you guys see PHP and its framworks/CMS in 2025?
-
How to modularize a big iOS project
So, how do we fix this? There is a cleaner solution. By using a dependency injection framework, such as Swinject we can create a base module that we might call the DI module.
SwiftyJSON
-
How does one decode this JSON data?
I don’t think you are going to be able to use JSONDecoder to do what you are asking. I see the problem is that you need to create a struct that has all the property names (pokemon names) in it in order to use JSONDecoder (that’s a pain). You need to resort to “parsing” the JSON and constructing your own data model to satisfy your requirements. Something like this might help. https://github.com/SwiftyJSON/SwiftyJSON
-
Best practices for parsing dynamic/unstructured JSON?
Up until now, I've been using SwiftyJSON, although it appears to be unmaintained. Is there an equivalent alternative which functions similarly? Thanks in advance
-
Awesome macOS Libraries List
SwiftyJSON - The better way to deal with JSON data in Swift. Language: Swift.
-
Need help with json data formatting
I second /u/daisnb that if possible, make sure the data is a consistent format and types, but if you’re unable to do that, I think SwiftyJSON can help, as it loosens the strict type requirement of Swift when handling JSON data
What are some alternatives?
Resolver - Swift Ultralight Dependency Injection / Service Locator framework
ObjectMapper - Simple JSON Object mapping written in Swift
Cleanse - Lightweight Swift Dependency Injection Framework
Decodable - [Probably deprecated] Swift 2/3 JSON unmarshalling done (more) right
Needle - Compile-time safe Swift dependency injection framework
Gloss - [Deprecated] A shiny JSON parsing library in Swift :sparkles: Loved by many from 2015-2021
Typhoon - Powerful dependency injection for Objective-C ✨✨ (https://PILGRIM.PH is the pure Swift successor to Typhoon!!)✨✨
HandyJSON - A handy swift json-object serialization/deserialization library
Dip - Simple Swift Dependency container. Use protocols to resolve your dependencies and avoid singletons / sharedInstances!
Mantle - Model framework for Cocoa and Cocoa Touch
Kraken - Simple Dependency Injection container for Swift. Use protocols to resolve dependencies with easy-to-use syntax!
Unbox