iOS iOS9下修改回HTTP模式进行网络请求
生活随笔
收集整理的这篇文章主要介绍了
iOS iOS9下修改回HTTP模式进行网络请求
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
升级为iOS9后,默认请求类型为https,如何使用http进行请求会报错
The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.方案一:让服务器修改为TLS1.2
方案二:在plist中设置使用http请求
第一步:在plist中添加NSAppTransportSecurity项,此项为NSDictionary
第二步:在NSAppTransportSecurity下添加
NSAllowsArbitraryLoads类型为Boolean,value为YES
转载于:https://www.cnblogs.com/pretty-guy/p/4816367.html
总结
以上是生活随笔为你收集整理的iOS iOS9下修改回HTTP模式进行网络请求的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: USACO翻译:USACO 2014 D
- 下一篇: 第九章 表单效验