我使用[NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *error)]
从Web服务中提取数据,但在Web服务器的SSL证书错误具有自颁发的证书,造成这种错误的出现:显示忽略与NSURLConnection的
错误使用:
NSAlert *a = [NSAlert alertWithError:error];
[a runModal];
有什么办法可以忽略这个错误并继续吗?
[忽略证书错误与NSURLConnection的]的可能重复(http://stackoverflow.com/questions/3766755/ignoring-certificate-errors -with-nsurlconnection) – paulmelnikow 2013-03-13 23:59:55
我觉得这个问题之前已经被问到过了,并且重新命名了前面的问题。希望它能解决你的问题。 – paulmelnikow 2013-03-14 00:00:50
你是对的这是一个骗局(虽然我没有得到答案,因为我搜索了'sendAsynchronousRequest',所以这个问题是专门针对该方法的)。 – colincameron 2013-03-14 15:13:24