From c881f4205a0e447a03f380912def95fba608fbee Mon Sep 17 00:00:00 2001 From: Gao Date: Fri, 19 Apr 2019 21:04:13 +0800 Subject: [PATCH] a --- .../patch/static_pod.rb | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/lib/cocoapods-static-swift-framework/patch/static_pod.rb b/lib/cocoapods-static-swift-framework/patch/static_pod.rb index 77feb41..44e0e82 100644 --- a/lib/cocoapods-static-swift-framework/patch/static_pod.rb +++ b/lib/cocoapods-static-swift-framework/patch/static_pod.rb @@ -1,8 +1,35 @@ module Pod class PodTarget - def static_framework? - return true + + if Pod::VERSION.start_with? "1.7" + + # static_swift_framework_old_new = instance_method :initialize + # define_method :initialize do |*args| + # result = static_swift_framework_old_new.bind(self).(*args) + # build_type.instance_variable_set(:@linkage, :static) + # next result + # end + + elsif (Pod::VERSION.start_with? "1.5") || (Pod::VERSION.start_with? "1.6") + + def static_framework? + return true + end end end end + module Pod + class Specification + module DSL + + module RootAttributesAccessors + + def static_framework + true + end + end + end + end + end +