您的位置:首页 > 移动开发

ios点击链接直接跳转到 App Store 指定应用下载页面

2016-06-03 10:33 906 查看
//跳转到应用页面

NSString *str = [NSString stringWithFormat:@"http://itunes.apple.com/us/app/id%d",appid];

[[UIApplication sharedApplication] openURL:[NSURL urlWithString:str]];

//跳转到评价页面

NSString *str = [NSString stringWithFormat: @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id;=%d", appid];

[[UIApplication sharedApplication] openURL:[NSURL urlWithString:str]];

必须在真机上才有效,模拟机上无效。

如果评论页面无法打开appstore,用下面这行代码

NSString *str = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&id=%@",appID];

[[UIApplication sharedApplication] openURL:[NSURL urlWithString:str]];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: