美文网首页iOS学习iOS 开发每天分享优质文章iOS开发
错误日志:请求失败--Error Domain=NSURLErr

错误日志:请求失败--Error Domain=NSURLErr

作者: TenMios | 来源:发表于2016-12-24 11:24 被阅读499次

错误信息:

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

错误域
运输安全政策需要一个安全的链接使用

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.

应用程序安全运输了明文HTTP资源负载是不安全的。暂时的异常可以通过你的应用程序 info. plist 文件配置

解决方法

A6A36E26-0BB1-4E59-B03B-A34A384A09B5.png

如果所示:1.在info .plist 中添加 APP Transport Security Settings

  1. 再在后面 添加 Allow Arbitrary Loads = YES 即可

相关文章

网友评论

    本文标题:错误日志:请求失败--Error Domain=NSURLErr

    本文链接:https://www.haomeiwen.com/subject/vsmlvttx.html