SimpleInjector 1.0.1

SimpleInjector 1.0.1

Maintained by Tancrede Chazallet.



  • By
  • Tancrede Chazallet

SimpleInjector

CI Status Version License Platform

Requirements

iOS 8.0+

Installation

SimpleInjector is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'SimpleInjector'

Usage

protocol FooService {}
class FooServiceImplementation: RandomService {}

class Bar {
    let fooService: FooService
    
    init(injector: Injector) {
        fooService = injector.dependency()
    }
}

let fooService = FooServiceImplementation()
let injector = Injector([fooService])
let bar = Bar(injector: injector)

Author

Tancrède Chazallet, [email protected]

License

SimpleInjector is available under the MIT license. See the LICENSE file for more info.