loading...

Answer: Error Handling Page of PhoneGap in IOS

serverbroad profile image Server Broad ・1 min read
  1. I created error.html in www folder under staging folder in Xcode.
  2. I make a change in config.xml under staging folder in Xcode as follow

<preference name="errorURL" value="error.html" />

in MainViewController.m : i created didFailLoadWithError method (see example below :

-(void) webView:(UIWebView*)theWebView didFailLoadWithError:(NSError*)error 
{
[theWebView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"error" ofType:@"html"

Discussion

markdown guide