phonegap/phonegap-plugins — Issue #360: ChildBrowser NSURL error 999 
Author: newphonegapper
Created: 2012-02-21 14:37:23+00:00
State: open

I just upgraded one of my apps to the new 1.4 version of phonegap.

My childbrowser plugin now pops up an error when opening certain webpages. The error reads:

"The Operation couldn't be completed (NSURLErrorDomain error- 999.)"

It only does it on certain websites.

I looked around and noticed that others had the same issue, and this code in ChildBrowserViewController.m was suppose to resolve this issue:

- (void)webView:(UIWebView *)wv didFailLoadWithError:(NSError *)error {
NSLog (@"webView:didFailLoadWithError");
[spinner stopAnimating];
addressLabel.text = @"Failed";
if (error != NULL) {
UIAlertView *errorAlert = [[UIAlertView alloc]
initWithTitle: [error localizedDescription]
message: [error localizedFailureReason]
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];

[errorAlert show];
[errorAlert release];
}
}

I looked in my ChildBrowserViewController.m and noticed that that code was already in my ChildBrowserViewController.m

Am I doing something wrong? If anyone could help me out I'd greatly appreciate it. Thanks!