如何在iPhone 3.0操作系统中修复NSURLErrorDomain错误-999 [英] How do I fix NSURLErrorDomain error -999 in iPhone 3.0 OS

查看:133
本文介绍了如何在iPhone 3.0操作系统中修复NSURLErrorDomain错误-999的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试更新我的iPhone应用程序以使用OS 3.0。我有一个显示页面正常的UIWebView。但是,当我单击一个链接时,它会调用我的委托给didFailLoadWithError,错误是操作无法完成。 (NSURLErrorDomain错误-999。)我确认这仍然适用于OS 2.2.1,所以它在3.0中发生了变化。

I am trying to update my iPhone app to work with OS 3.0. I have a UIWebView that shows a page fine. But when I click a link it calls my delegate for didFailLoadWithError and the error is Operation could not be completed. (NSURLErrorDomain error -999.) I verified this is still working with OS 2.2.1, so it is something changed in 3.0.

任何想法?

推荐答案

我能找到答案这里

此主题包含此说明对于此错误:如果在完成WebView的上一个请求之前发出另一个请求,则可能会发生此错误...

This thread contained this description for this error: This error may occur if an another request is made before the previous request of WebView is completed...

我通过忽略此错误并让webview继续加载来解决这个问题。

I worked around this by ignoring this error and letting the webview continue to load.

if ([error code] != NSURLErrorCancelled) {
//show error alert, etc.
}

这篇关于如何在iPhone 3.0操作系统中修复NSURLErrorDomain错误-999的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆