如何修复 iPhone 3.0 操作系统中的 NSURLErrorDomain 错误

编程入门 行业动态 更新时间:2024-10-26 16:33:37
本文介绍了如何修复 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 错误

本文发布于:2023-11-26 05:45:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1632869.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:操作系统   错误   iPhone   NSURLErrorDomain

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!