Swiftpack.co - SwiftCommon/Steroids as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by SwiftCommon.
SwiftCommon/Steroids 0.0.2
@Injected is Swinject on Steroids
⭐️ 1
🕓 3 years ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/SwiftCommon/Steroids.git", from: "0.0.2")

Steroids for Swinject

Swift 5.0+ license Build Status codecov

@Injected is Swinject on Steroids.

Getting started

On first checkout you best run: $ make setup that will trigger the scripts/setup bash script to run and check the required dependencies and generate the Xcodeproj.

Features

Injected propertyWrapper

class VeryClass {
    @Injected var someService: SomeAwesomeService
    @Injected(name: "crystal") var namedService: SomeAwesomeService
}

Register through Swinject Container

// Register a Service
Dealer.shared.push(name: "crystal") { _ in MagicBlues() as SomeAwesomeService }

// Remove all registrations
Dealer.shared.reset()

Installation

Swift PM

Put this in your Package.swift:

    ...
    dependencies: [
       .package(url: "https://github.com/SwiftCommon/Steroids", from: "0.0.1")
    ],
    targets: [
       .target(
          name: "YourAwesomeApp",
          dependencies: ["Steroids"]
       )
    ]

License

Licensed under the MIT license.

GitHub

link
Stars: 1
Last commit: 3 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

0.0.2 - Documentation
3 years ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics