一个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 

你可能感兴趣的:(一个IOS9 网络问题)