我在升级到iOS5的的SDK和PhoneGap的1.0.0PhoneGap/iOS - 如何让Childbrowser忽略与Appstore的链接?
的Childbrowser插件正常工作过程中的应用程序,但被点击iTunes应用程序商店的链接时 - 该链接在Childbrowser开业窗口。
我宁愿它直接在Appstore中打开,如果我不使用ChildBrowser插件,会发生什么情况。
这是AppStore的链接(指向提交AppStore上的复审页)
,这是AppDelegate中如何修改
AppDelegate.m,滚动一路下跌并更换以下:
- (BOOL)webView:(UIWebView *)theWebView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
{
return [ super webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType ];
}
与此:
- (BOOL)webView:(UIWebView *)theWebView shouldStartLoadWithRequest:
(NSURLRequest *)request navigationType:
(UIWebViewNavigationType)navigationType
{
NSURL *url = [request URL];
if ([[url scheme] isEqualToString:@"gap"] || [url isFileURL]) {
return [ super webView:theWebView shouldStartLoadWithRequest:request
navigationType:navigationType ];
}
else {
ChildBrowserViewController* childBrowser =
[ [ ChildBrowserViewController alloc ] initWithScale:FALSE ];
[super.viewController presentModalViewController:childBrowser
animated:YES ];
[childBrowser loadURL:[url description]];
[childBrowser release];
return NO;
}
}
我用我这篇文章介绍的方法来获得Childbrowser和运行 http://iphonedevlog.wordpress.com/2011/09/24/installing-childbrowser-into-xcode-4-with-phonegap-1-0-mac-os-x-snow-leopard/
如何改变这种以产生所需的行动有什么想法?
非常感谢..