读书人

iOS使用内打开App Store应用详情界面

发布时间: 2013-02-15 15:46:56 作者: rapoo

iOS应用内打开App Store应用详情界面

用iPhone浏览UC浏览器的“应用商店”时,发现可以直接在应用内打开App Store中的应用详情和下载页面。效果如下:

iOS使用内打开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


读书人网 >操作系统

热点推荐