网站开发软件d,西宁网站设计制作公司,网站建设要准备些什么,WORDPRESS如何播放视频swift加载h5页面空白
problem
背景
xcode swift 项目#xff0c;WebView方式加载h5页面本地h5地址是#xff1a;http://localhost:5173/ 浏览器打开正常
Swift 加载h5#xff1a;
百度官网 加载正常本地h5页面 加载空白#xff0c;没有报错 override func viewDidLoad…swift加载h5页面空白
problem
背景
xcode swift 项目WebView方式加载h5页面本地h5地址是http://localhost:5173/ 浏览器打开正常
Swift 加载h5
百度官网 加载正常本地h5页面 加载空白没有报错 override func viewDidLoad() {super.viewDidLoad()// let myURL URL(string:https://www.baidu.com) // oklet myURL URL(string:http://localhost:5173/) // not working 页面空白let myRequest URLRequest(url: myURL!)webView.load(myRequest)}}reason
本地是http服务需要加个配置
solution
用源码方式打开 info.plist 文件
右键- open as - source code添加以下配置
keyNSAppTransportSecurity/key
dictkeyNSAllowsArbitraryLoads/keytrue/
/dict