I've just upgraded to PhoneGap 1.6.1 and I can no longer get external URL's to open in Safari.
Prior to this version I had patched AppDelegate.m as follows:
- (BOOL) webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
{
NSURL *url = [request URL];
if ([[url scheme] isEqualToString:@"http"]) {
[[UIApplication sharedApplication] openURL:url];
return NO;
} else {
return [self.viewController webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType];
}
}
I notice that a similar question has been asked before: How can I open an external link in Safari not the app's UIWebView?
But it looks to me like this answer no longer works on version 1.6.1.
I've also tried setting OpenAllWhitelistURLsInWebView in Cordova.plist but neither setting gives me Safari.
Thanks in advance.
_self
in WebView, and_blank
in external browser: stackoverflow.com/questions/32208609/…