次のhttps://github.com/apache/incubator-cordova-macを使用して mac os x アプリを作成していますが、_blank リンクを開くことができないようです。誰かがその方法を知っていれば、それは素晴らしいことです。
回答 1) - 機能しませんでした
これを WebViewDelegate.m に配置しました -
UIWebViewNavigationType < はエラーです
- (BOOL) webView:(WebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
{
//return [self.viewController webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType];
NSURL *url = [request URL];
// Intercept the external http requests and forward to Safari.app
// Otherwise forward to the PhoneGap WebView
if ([[url scheme] isEqualToString:@"http"] || [[url scheme] isEqualToString:@"https"] || [[url scheme] isEqualToString:@"itms-apps"]) {
[[UIApplication sharedApplication] openURL:url];
return NO;
}
else {
return [self.viewController webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType];
}
}