# remove UIKit(UIWebView) rejected by AppStore
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
在profile中添加以上代码,重新pod install一下
本文介绍了一种在UIKit中移除UIWebView组件的方法,通过在profile中添加特定代码并重新进行pod install,可以避免应用被App Store拒绝。此过程涉及到对文件系统的操作和条件判断,确保仅移除与UIWebView相关的文件。
1万+

被折叠的 条评论
为什么被折叠?



