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

IOS开发应用内跳转app store去下载、评分

2016-05-24 14:11 676 查看
//        1. 评分:
NSString *str = [NSString stringWithFormat: @"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@",@"1111791856"];
NSURL *aURL = [NSURL URLWithString:str];
if ([[UIApplication sharedApplication] canOpenURL:aURL]) {
[[UIApplication sharedApplication] openURL:aURL];
}
else
{
NSLog(@"不能打开app store评分");
}
//        2. 首页:
//        NSString *str2 = [NSString stringWithFormat: @"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=%@",  @"1111791856"];
//        NSURL *bURL = [NSURL URLWithString:str2];
//        if ([[UIApplication sharedApplication] canOpenURL:bURL]) {
//            [[UIApplication sharedApplication] openURL:bURL];
//        }
//        else
//        {
//            NSLog(@"不能打开app store");
//        }
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息