diff --git a/Cartfile b/Cartfile index 821f23d..ffef5b8 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "Swinject/Swinject" ~> 2.2 +github "Swinject/Swinject" ~> 2.3 diff --git a/Cartfile.resolved b/Cartfile.resolved index 3256b66..2f0c319 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,3 +1,3 @@ github "Quick/Nimble" "v7.0.3" github "Quick/Quick" "v1.2.0" -github "Swinject/Swinject" "2.2.0" +github "Swinject/Swinject" "2.3.0" diff --git a/Sources/SwinjectStoryboard.swift b/Sources/SwinjectStoryboard.swift index 5d8cec9..28c1c8e 100644 --- a/Sources/SwinjectStoryboard.swift +++ b/Sources/SwinjectStoryboard.swift @@ -104,8 +104,8 @@ public class SwinjectStoryboard: _SwinjectStoryboardBase, SwinjectStoryboardProt // https://github.com/Swinject/Swinject/issues/10 if let container = container.value as? _Resolver { let option = SwinjectStoryboardOption(controllerType: type(of: viewController)) - typealias FactoryType = (Resolver, Container.Controller) -> Container.Controller - let _ = container._resolve(name: registrationName, option: option) { (factory: FactoryType) in factory(self.container.value, viewController) } + typealias FactoryType = (Resolver, Container.Controller) -> Any + let _ = container._resolve(name: registrationName, option: option) { (factory: FactoryType) in factory(self.container.value, viewController) } as Container.Controller? } else { fatalError("A type conforming Resolver protocol must conform _Resolver protocol too.") } @@ -146,8 +146,8 @@ public class SwinjectStoryboard: _SwinjectStoryboardBase, SwinjectStoryboardProt // https://github.com/Swinject/Swinject/issues/10 if let container = container.value as? _Resolver { let option = SwinjectStoryboardOption(controllerType: type(of: controller)) - typealias FactoryType = (Resolver, Container.Controller) -> Container.Controller - let _ = container._resolve(name: registrationName, option: option) { (factory: FactoryType) in factory(self.container.value, controller) } + typealias FactoryType = (Resolver, Container.Controller) -> Any + let _ = container._resolve(name: registrationName, option: option) { (factory: FactoryType) -> Any in factory(self.container.value, controller) } as Container.Controller? } else { fatalError("A type conforming Resolver protocol must conform _Resolver protocol too.") } diff --git a/SwinjectStoryboard.podspec b/SwinjectStoryboard.podspec index 7f0cb3e..db122f3 100644 --- a/SwinjectStoryboard.podspec +++ b/SwinjectStoryboard.podspec @@ -17,6 +17,6 @@ Pod::Spec.new do |s| s.ios.deployment_target = '8.0' s.osx.deployment_target = '10.10' s.tvos.deployment_target = '9.0' - s.dependency 'Swinject', '~> 2.2' + s.dependency 'Swinject', '~> 2.3' s.requires_arc = true end diff --git a/Tests/Container+SwinjectStoryboardSpec.swift b/Tests/Container+SwinjectStoryboardSpec.swift index 85ba334..519ae13 100644 --- a/Tests/Container+SwinjectStoryboardSpec.swift +++ b/Tests/Container+SwinjectStoryboardSpec.swift @@ -26,7 +26,7 @@ class Container_SwinjectStoryboardSpec: QuickSpec { expect(container.description) == "[\n" + " { Service: \(controllerType), Storyboard: SwinjectStoryboardTests.AnimalViewController, " - + "Factory: (Resolver, \(controllerType)) -> \(controllerType), ObjectScope: graph, InitCompleted: Specified }\n" + + "Factory: (Resolver, \(controllerType)) -> \(controllerType), ObjectScope: graph, InitCompleted: Specified 1 closures }\n" + "]" } }