The resource could not be loaded because the App Transport Security policy requires the use of a sec

今天升级Xcode 7.0 bata发现网络访问失败。
输出错误信息

The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
Google后查证,iOS9引入了新特性App Transport Security (ATS)。详情:App Transport Security (ATS)

新特性要求App内访问的网络必须使用HTTPS协议。
但是现在公司的项目使用的是HTTP协议,使用私有加密方式保证数据安全。现在也不能马上改成HTTPS协议传输。

最终找到以下解决办法:

在Info.plist中添加NSAppTransportSecurity类型Dictionary。
在NSAppTransportSecurity下添加NSAllowsArbitraryLoads类型Boolean,值设为YES

这个属于字体不符合问题。。。

iOS8之前是
zh-Hans: 简体
zh-Hant: 繁体
zh-HK: 香港繁体(增加)


iOS9是
zh-Hans-CN: 简体(改变)
zh-Hant-CN: 繁体(改变)
zh-HK: 香港繁体  
zh-TW:  台湾繁体(增加)

猜你喜欢

转载自blog.csdn.net/xiao19911130/article/details/48544389