由于Xcode的更新,当开发者升级到Xcdoe7.0后,发现不能联网了
#warning: 获取app配置信息失败: The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
#warning: 获取app配置信息失败: The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
那是因为 iOS9 引入了新特性App Transport Security (ATS)。
详情:App Transport Security (ATS)
新特性要求App内访问的网络必须使用HTTPS协议。
但是现在公司的项目使用的是HTTP协议,使用私有加密方式保证数据安全。现在也不能马上改成HTTPS协议传输。
最终找到以下解决办法:
在Info.plist中添加NSAppTransportSecurity类型Dictionary。在NSAppTransportSecurity下添加NSAllowsArbitraryLoads类型Boolean,值设为YES
![](https://i-blog.csdnimg.cn/blog_migrate/362926e3262cd0a9fa47b5fcf1cbfc34.webp?x-image-process=image/format,png)
2F5721B6-2C74-4B59-84B3-7D77C541038F.png
转载自:
文/_会飞的鱼(简书作者)
原文链接:http://www.jianshu.com/p/4dd5773270f4
著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。
原文链接:http://www.jianshu.com/p/4dd5773270f4
著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。