原文链接 A scheme by use pre_install hook to remove the files related about UIWebView, the only things you need do is copy the following code to your Podfile. pre_install do |installer| puts 'pre_install begin....' dir_af = File.join(installer.sandbox.pod_dir('AFNetworking'), 'UIKit+AFNetworking') Dir.foreach(dir_af) {|x| real_path = File.join(dir_af, x) if (!File.directory?(real_path) && File.exists?(real_path)) if((x.start_with?('UIWebView') || x == 'UIKit+AFNetworking.h')) File.delete(real_path) puts 'delete:'+ x end end } puts 'end pre_install.' end