iOS应用内打开App Store应用详情界面
用iPhone浏览UC浏览器的“应用商店”时,发现可以直接在应用内打开App Store中的应用详情和下载页面。效果如下:
下面来看看怎么实现这个效果吧。
苹果官方文档 "SKStoreProductViewController Class Reference"里有如下介绍:
- (void)outerOpenAppWithIdentifier:(NSString *)appId { NSString *urlStr = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/us/app/id%@?mt=8", appId]; NSURL *url = [NSURL URLWithString:urlStr]; [[UIApplication sharedApplication] openURL:url];}
获取应用的链接方法可参考:http://itunes.apple.com/linkmaker
苹果官方文档:http://developer.apple.com/library/ios/#documentation/StoreKit/Reference/SKITunesProductViewController_Ref/Introduction/Introduction.html#//apple_ref/doc/c_ref/SKStoreProductViewController