初学swift的网络请求,就遇到
“App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app’s Info.plist file”7
想想也是心痛,不过这个也好解决:
- 找到plist文件
- 添加 App Transport Security Settings 类型是 字典
- 在上面添加的下面添加 Allow Arbitrary loads 类型 Bool 参数 Yes
- 完成如下图:
然后cmd+r 欧克 =。=
网友评论