From 38690181f82806f283c6198f9b20bc7395d795d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Van=CC=8Co?= Date: Tue, 8 May 2018 16:08:57 +0200 Subject: [PATCH] Add support for static lib via cocoapods --- Cartfile.resolved | 2 +- Sources/SwinjectStoryboard+SetUp.m | 7 ++++++- Sources/iOS-tvOS/UIStoryboard+Swizzling.m | 7 ++++++- SwinjectStoryboard.podspec | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Cartfile.resolved b/Cartfile.resolved index 2f0c319..28055be 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.3.0" +github "Swinject/Swinject" "2.4.0" diff --git a/Sources/SwinjectStoryboard+SetUp.m b/Sources/SwinjectStoryboard+SetUp.m index cfd8c3d..384d63f 100644 --- a/Sources/SwinjectStoryboard+SetUp.m +++ b/Sources/SwinjectStoryboard+SetUp.m @@ -8,7 +8,12 @@ #import #import -#import + +#if __has_include() + #import +#elif __has_include("SwinjectStoryboard-Swift.h") + #import "SwinjectStoryboard-Swift.h" +#endif @interface SwinjectStoryboard (SetUp) diff --git a/Sources/iOS-tvOS/UIStoryboard+Swizzling.m b/Sources/iOS-tvOS/UIStoryboard+Swizzling.m index c599900..0c26948 100644 --- a/Sources/iOS-tvOS/UIStoryboard+Swizzling.m +++ b/Sources/iOS-tvOS/UIStoryboard+Swizzling.m @@ -8,9 +8,14 @@ #import "UIStoryboard+Swizzling.h" #import -#import #import +#if __has_include() + #import +#elif __has_include("SwinjectStoryboard-Swift.h") + #import "SwinjectStoryboard-Swift.h" +#endif + @implementation UIStoryboard (Swizzling) + (void)load { diff --git a/SwinjectStoryboard.podspec b/SwinjectStoryboard.podspec index 2372694..d19e069 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.3' + s.dependency 'Swinject', '~> 2.4' s.requires_arc = true end