App Transport Security HTTP问题处理

两年前的一个老项目,用户反馈在iPhone5出现不能下载文件,连接iPhone5 iOS10.1进行调试,点击下载Print Log---------

App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.

在WWDC2015大会上提到要使用https://格式,即要求App内访问网络请求,要采用 HTTPS 协议。

如下图在Info.plist中增加Dictionary类型的Key为App Transport Security Settings.并增加布尔为YES的key。

提高技能如同提升自信心。
原文地址:https://www.cnblogs.com/chims-liu-touch/p/6293495.html