Install Pods as dynamic-framework that specified as static-framework in spec

Updated
Jan 12, 2021 11:54 AM
Created
Jan 12, 2021 11:49 AM
Tags
Cocoapods
Keywords
pre_install do |installer|
  installer.analysis_result.pod_targets.each { |target|
    if target.build_as_static_framework?
      Pod::UI.puts "📦 Found static framework #{target.pod_name}. Convert to dynamic framework"
      def target.build_type
        Pod::BuildType.static_framework
      end

      def target.build_as_static_framework?
        true
      end
    end
  }
end