Reputation: 2379
I have Phonegap project where i have requirement for open iframe, where I am trying to open an iframe with JavaScript. I get the error in iOS
Error: The operation couldn't be completed. (NSURLErrorDomain error -999)
Anyone here knows about this error or how to open iframe in Phonegap iOS.
Upvotes: 9
Views: 7117
Reputation: 12884
All the other answers are true, but what to do then?
If you catch the error with the UIWebViewDelegate, you can try reloading the content until it loaded successfully. Just insert the requestWithURL
a second time in the
- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error
delegate. This will cycle until the page loads successfully. This is especially necessary with Facebook and Twitter. If you don't want to run into a deadlock, you can count up an int property in your object that bypasses the request after trying 5 times.
Upvotes: 0
Reputation:
NSURLErrorCancelled Returned when an asynchronous load is canceled. A Web Kit framework delegate will receive this error when it performs a cancel operation on a loading resource. Note that an NSURLConnection or NSURLDownload delegate will not receive this error if the download is canceled. Available in OS X v10.2 and later. Declared in NSURLError.h.
Upvotes: 4
Reputation: 115
NSURLErrorDomain error -999 is triggered when asynchronous network call is cancelled.
NSURLErrorDomain error -999 == NSURLErrorCancelled
Not sure how this would help, but hopefully it'll give you a new perspective.
Upvotes: 0