Cocoapods同时导入静态库和动态库

platform :ios, '14.1'


target :'LGNetworkManager' do
  use_frameworks!
  # 静态库、动态库
  # 指定需要被编译成static_framework的库
  $static_framework = ['AFNetworking']
  
  pre_install do |installer|
  installer.pod_targets.each do |pod|
        if $static_framework.include?(pod.name)
            def pod.build_type;
              Pod::Target::BuildType.static_framework
            end
        end
    end
  end
  pod 'SDWebImage'
end

 

posted @ 2023-08-01 14:23  LSPBoy  阅读(165)  评论(0编辑  收藏  举报