1

How can we retrieve the NSURLRequest that failed to load when the UIWebViewDelegate is called back with didFailLoadWithError (which gets only the NSError) ? We could stash the NSURLRequest when shouldStartLoadWithRequest is called, but what if the UIWebView is loading multiple requests simultaneously (e.g., a page with scripts, stylesheets, etc.) How do we determine which URL failed to load?

tribalvibes
  • 2,097
  • 3
  • 25
  • 30

2 Answers2

0

Can you get it from the webView? webView.request?

ctrlspace
  • 519
  • 5
  • 15
0

Hmm... looks like the NSError has a NSErrorFailingURLKey key with the URL which is good enough for now... but is there a way to directly get the NSURLRequest?

tribalvibes
  • 2,097
  • 3
  • 25
  • 30