您的位置:首页 > 理论基础 > 计算机网络

App Transport Security has blocked a cleartext HTTP

2015-11-10 15:59 781 查看

问题

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.

Error Domain=NSURLErrorDomain Code=-1022 "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection."

原因

在iOS9以后,苹果App内访问网络请求,要求采用 HTTPS 协议。。

解决方法

方法一、使用https协议。(废话了,就当没说)

方法二、如图新增一条Info配置,http的可以继续用。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: