xcode7以上UIWebView报错:The resource could not be loaded

来源:互联网 发布:nginx反向代理跨域 编辑:程序博客网 时间:2024/06/14 19:04

xcode7以上UIWebView报错:

The resource  could not be loaded

because the app transport security

policy requires the use of a secure connection


解决方法:

方法1、把App内访问的网络协议由http修改为https

方法2、在Info.plist中添加NSAppTransportSecurity类型Dictionary

NSAppTransportSecurity下添加NSAllowsArbitraryLoads类型Boolean,值设为YES


0 0
原创粉丝点击