If i write my container in swift, can it also support objective-c classes?
Yes, it can - you cannot use Swinject from Obj-c code, but Swift code has full access to Obj-c classes, and Swinject doesn't care whether class was written in Obj-c or Swift.
I'm closing this issue because the answer looks clear. @oronbz, please feel free to reopen this issue if the question was not actually answered.
this is my code fragment
public class func registerService(anyProtocol: Protocol, anyClass: AnyClass) {
DIContainer.container.register(anyProtocol.self) { _ in anyClass.init() }
},
any help, thk you
Most helpful comment
Yes, it can - you cannot use Swinject from Obj-c code, but Swift code has full access to Obj-c classes, and Swinject doesn't care whether class was written in Obj-c or Swift.