-
Subscript implementation for injecting objects using:
let myObject = injector[MyClass.self] let myOhterObject: MyClass? = injector[MyClass.self] as MyClass // This requires explicit casting
- fixes issue with implicitly unwrapped optional used for object bindings in Swift 3.1 (Xcode 8.3.x); now the object bindings defines the property type
Any?
0.6.0 - 26.01.2017
- Continuous Integration setup with build status badge in README
- Code documentation
- Swift Package manifest
CHANGELOG
-
Resolved exception when
Swifjection
couldn't create instance of singleton object -
Changed order of closure binding function parameters:
func bind(closure: @escaping ((Injecting) -> Any), toType type: Any.Type)
was renamed to
func bind(type: Any.Type, with closure: @escaping ((Injecting) -> Any))
This allows to omit argument name and have closure defined after closing parenthesis. Instead of:
bindings.bind(closure: { (injector: Injecting) -> AnyObject in return SomeClass() }, toType: SomeClass.self)
you can use:
bindings.bind(type: SomeClass.self) { (injector: Injecting) -> AnyObject in return SomeClass() }
0.5.0 - 18.01.2017 (Public release)
- README with framework descripton and examples
- CONTRIBUTION document
0.4.1 - 22.12.2016
- Updated object binding to allow binding struct objects
0.4.0 - 10.11.2016
- Type to type binding
- Singleton binding
- Added bindings container object, conforming to
Binding
protocol, instead of keeping instances, or closures assigned directly to type
- Changed bind functions
toType
parameter type fromAny
toAny.Type
0.3.1 - 28.10.2016
- Bindings properties and functions access control
0.3.0 - 28.10.2016
Swifjector
class implementingInjecting
protocol
- Extracted binding from
Injecting
protocol to separateBindings
class
0.2.0 - 28.10.2016 (First internal release)
- Injectable protocol, and extension with default implementation of
injectDependencies(injector: Injecting)
function - Injecting protocol, and extensions with default implementations of binding functions and creating dependencies functions
- Object binding
- Closure binding