使用SDWebImage加载“http://”开头的图片报错,错误如下:

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.

找查资料后发现,iOS新特性要求App内访问网络请求,要采用 HTTPS 协议。

解决办法如下:

在Info.plist文件中添加"App Transport Security Settings", Type设为"Dictionary",再添加"Allow Arbitray Loads", Type 设为"Boolean",“Value”为“YES”即可。

 

App Transport Security has blocked a cleartext HTTP (http://)

相关文章:

  • 2022-12-23
  • 2021-09-18
  • 2022-12-23
  • 2022-12-23
  • 2020-01-08
  • 2022-02-20
  • 2021-07-07
  • 2022-12-23
猜你喜欢
  • 2021-12-03
  • 2022-12-23
  • 2021-10-16
  • 2022-12-23
  • 2022-12-23
  • 2021-05-18
  • 2022-12-23
相关资源
相似解决方案