wkwebView 跨域

let configuration = WKWebViewConfiguration()
configuration.preferences.setValue(true, forKey: "allowFileAccessFromFileURLs")
if #available(iOS 10.0, *){
    configuration.setValue(true, forKey: "allowUniversalAccessFromFileURLs")
}
        

你可能感兴趣的:(wkwebView 跨域)