ios9 http问题

Xcode7网络报错2:

 

升级[The resource could not be loaded because the App Transport Security policy requires the iOS9引入了新特性App Transport Security (ATS)

新特性要求App内访问的网络必须使用HTTP协议,使用私有加密方式保证数据安全。现在也不能马上改成 解决办法如下:

  1. 在Info.plist中添加NSAppTransportSecurity类型Dictionary

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

 
 
原文地址:https://www.cnblogs.com/canghaixiaoyuer/p/4849776.html