本打算做一个新工程, 但是改来改去就是网络请求不成功,失败原因如下。

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.

 

解决方法:

1,服务器改为https

2,客户端

在info.plist 加入key

App Transport Security Settings

Allow Arbitrary Loads

注意事项,添加之后可能还不行, 这时候记得clean 一下。或者把手机上的app删除了重新跑代码。

iOS 开发苹果由http改为https 之后,如果服务器不做相应的修改,那么客户端需要做点更改

     geige

相关文章:

  • 2022-02-09
  • 2021-09-20
  • 2022-02-15
  • 2021-09-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-04
  • 2021-11-19
  • 2021-12-15
  • 2021-04-21
  • 2021-04-02
相关资源
相似解决方案