Dependency injection for iOS (Swift)
Add new safety idea - root components. For more information your can see link
Remove SpinLock and increase minimum OS version
Add simple one modificator injection into initialize method. For example:
Old: container.register { Cat(name: arg($0), owner: $1, home: $2) }
New: container.register(Cat.init) { arg($0) }
Fix argument injection for Tag and named resolve. for example:
container.register { MyClass(inj: arg($0)) }
.as(name: "Name", MyProtocol.self)
.as(tag: MyTag.self, MyProtocol.self)
let arg = AnyArgument(type: MyProtocol.self, value: 1)
let obj1: MyProtocol = container.resolve(name: "Name", arguments: arg)
let obj2: MyProtocol = by(tag: MyTag.self, on: container.resolve(arguments: arg))
Fix arguments resolve if for resolve used none base type. for example: let a: T? = container.resolve(args: ...)
. In current example T
is Optional
. Also fix if T
use many or tag.
Warning! This version change public API!
Fix potential crash into FastLock. For more information saw: https://github.com/ivlevAstef/SwiftLazy/issues/6
DICacheStorage
. Actually only if you use custom lifetime.initializeSingletonObjects
and initializeObjectsForScope
Fix memory leak ParsedType. About bug in comments #159 issue