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:
<
I have used this in the MainViewController.m
- (BOOL)webView:(UIWebView *)theWebView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
{
NSURL *url = [request URL];
NSString *str = url.absoluteString;
NSRange range = [str rangeOfString:@"http://"];
//HACK to make url open in safari
if (range.location != NSNotFound) {
[[UIApplication sharedApplication] openURL:url];
return NO;
}
else {
return [ super webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType ];
}
}