xcode7以后,访问https服务器
2016-06-03 22:27
477 查看
在plist中
增加NSAppTransportSecurity nsdictionary
子属性 NSAllowsArbitraryLoads boolean YES
就能正常访问
如果不加,报如下错误:
UserInfo={NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x7fec41ee5df0>, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, NSUnderlyingError=0x7fec41ee8800 {Error Domain=kCFErrorDomainCFNetwork
Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made."
增加NSAppTransportSecurity nsdictionary
子属性 NSAllowsArbitraryLoads boolean YES
就能正常访问
如果不加,报如下错误:
UserInfo={NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x7fec41ee5df0>, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, NSUnderlyingError=0x7fec41ee8800 {Error Domain=kCFErrorDomainCFNetwork
Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made."
相关文章推荐
- linux网络基本设置
- Ajax
- HTTP请求报文和响应报文
- https相关原理
- Universal-Image-Loader,android-Volley,Picasso、Fresco和Glide五大Android开源组件加载网络图片比较
- to tell something in brief about default init receive window of TCP
- python网络爬虫框架Scrapy
- 拦截广告,避免隐私泄露的几种方法
- 开源C++网络底层库
- USACO5.4 TSP_背包_网络流拆点
- 使用epoll编写TCP服务器端
- java网络编程_思维导图总结2
- java网络编程_思维导图总结1
- okhttp3 retrofit2 缓存问题
- boost异步tcp通信技术练习
- 基于Theano的多层神经网络及其实现(三)(实现代码)
- 基于Theano的多层神经网络及其实现(二)
- 基于Theano的多层神经网络及其实现(一)
- 学习thinkphp中自带的http.class.php工具类
- windows共享问题