diff --git a/DIKit.podspec b/DIKit.podspec index f7359bc..c88568c 100644 --- a/DIKit.podspec +++ b/DIKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "DIKit" - s.version = "1.6.1" + s.version = "1.6.2" s.license = { :type => "MIT", :file => "LICENSE" } s.summary = "Dependency Injection Framework for Swift." @@ -12,7 +12,7 @@ Pod::Spec.new do |s| s.platform = :ios, "9.0" s.swift_version = "5.4" - s.source = { :git => "https://github.com/benjohnde/DIKit.git", :tag => "#{s.version}" } + s.source = { :git => "https://github.com/AlessioCampanelli/DIKit-runtime.git", :tag => "#{s.version}" } s.source_files = "DIKit/Sources/**/*.{swift}" s.requires_arc = true diff --git a/DIKit/Sources/Container/DependencyContainer+Context.swift b/DIKit/Sources/Container/DependencyContainer+Context.swift index ccad253..dc05b8a 100644 --- a/DIKit/Sources/Container/DependencyContainer+Context.swift +++ b/DIKit/Sources/Container/DependencyContainer+Context.swift @@ -19,4 +19,13 @@ extension DependencyContainer { } self.root = root } + + /// Defines the used `DependencyContainer` root at runtime for resolving components. + /// Can can be statically resolved for injection. + /// + /// - Parameters: + /// - by: *DependencyContainer* the root `DependencyContainer` + public static func definedAtRuntime(by root: DependencyContainer) { + self.root = root + } }