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

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


你可能感兴趣的:(ios,UIWebView,Xcode7)