From 467334d7f3652dd74739cbe9a25b7f091fa3d674 Mon Sep 17 00:00:00 2001 From: Alessio Campanelli Date: Fri, 17 Nov 2023 11:23:11 +0100 Subject: [PATCH 1/2] define at runtime --- .../Sources/Container/DependencyContainer+Context.swift | 9 +++++++++ 1 file changed, 9 insertions(+) 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 + } } From 820ba46853f024b83e52c5d3762a41f534b4d0c0 Mon Sep 17 00:00:00 2001 From: Alessio Campanelli Date: Fri, 17 Nov 2023 11:28:13 +0100 Subject: [PATCH 2/2] update pod version --- DIKit.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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