Skip to content

Commit

Permalink
fix(ios): show error message when app fails to load (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile committed Jun 26, 2019
1 parent ffcbfb9 commit cb1f026
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ios/CDVWKWebViewEngine.m
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,11 @@ - (void)webView:(WKWebView*)theWebView didFailNavigation:(WKNavigation*)navigati
NSLog(@"%@", [errorUrl absoluteString]);
[theWebView loadRequest:[NSURLRequest requestWithURL:errorUrl]];
}
#ifdef DEBUG
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"] message:message preferredStyle:UIAlertControllerStyleAlert];
[alertController addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"OK", nil) style:UIAlertActionStyleDefault handler:nil]];
[vc presentViewController:alertController animated:YES completion:nil];
#endif
}

- (void)webViewWebContentProcessDidTerminate:(WKWebView *)webView
Expand Down

0 comments on commit cb1f026

Please sign in to comment.