一个IOS9 网络问题

一个IOS9 网络问题   


在ios9下,使用afnetworking执行http请求( http://apitest.XXX.com/Login),但是一直返回的是error

Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo=0x7ffad9c498b0 {_kCFStreamErrorCodeKey=-9806, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, NSUnderlyingError=0x7ffadba9ae40 "An SSL error has occurred and a secure connection to the server cannot be made.", NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://apitest.XXX.com/Login, NSErrorFailingURLStringKey=iption=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://apitest.XXX.com/Login, _kCFStreamErrorDomainKey=3}

报错说ssl的问题,但是我访问的是http啊,不是https

在ios8运行就没有这个问题,求解这是个什么情况啊

在info.plist文件里面手动添加 NSAppTransportSecurity, NSAllowsArbitraryLoads,应该就可以了,参考图片 
图片:nGw3j.png 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值