UIWebViewDelegate returns different error message on iPod Touch 2G and 3G

Posted by lostInTransit on Stack Overflow See other posts from Stack Overflow or by lostInTransit
Published on 2010-03-23T16:00:06Z Indexed on 2010/03/24 3:23 UTC
Read the original article Hit count: 420

Filed under:
|
|

Hi

I have an app developed using SDK 3.0. My view has a UIWebView whose delegate is the viewcontroller. I want to show an error message when the webview does not load (in case the touch goes out of wifi range or wifi is turned off)

I override this method to show an alert

- (void)webView:(UIWebView *)wbView didFailLoadWithError:(NSError *)error

But this caused an issue when some links were clicked on the webview. The page loaded but if some images from the previous page were not loaded, the method call was triggered.

Testing on an iPod Touch 3G, the NSError's userInfo has the localized description as no Internet connection if load fails due to no internet connection. But this only seems to be true for an iPod Touch 3G. 2G shows a different message (I got to know from some beta testers. They aren't very technical so can't tell them to get me the logs or anything.)

Can anyone with an iPod Touch 2G tell me the values for the NSError userInfo? Or better still, did anyone else face this issue? How did you resolve it?

Thanks.

© Stack Overflow or respective owner

Related posts about iphone-sdk

Related posts about ipod-touch