app使用http协议

作者: 小北风sky | 来源:发表于2016-09-16 21:06 被阅读227次

更改app使用http协议

新建程序网络访问报错

The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.

新特性要求App内访问的网络必须使用HTTPS协议
App Transport Security (ATS)

解决办法:

  1. Info.plist中添加NSAppTransportSecurity类型为Dictionary

  2. 在App Transport Security Setting下添加NSAllowsArbitraryLoads类型Boolean,值设为YES

相关文章

网友评论

    本文标题:app使用http协议

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