Ran
Ran

Reputation: 303

NSURLConnection finished with error - 1001

First, the url is unreachable, When the webview called loadRequest, it has two error messages.And the UIWebViewDelegate didFailLoadWithError couldn't be called.

NSURLConnection finished with error - code -1001

HTTP load failed (error code: -999 [1:89])

 NSURLRequest *request =[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://ip:port/index"] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:5];

[self.webView loadRequest:request];

Upvotes: 1

Views: 6620

Answers (1)

Ran
Ran

Reputation: 303

I didn't set webView.delegate, so the delegates didn't be called

Upvotes: 3

Related Questions