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

来源:互联网 发布:社交网络弊端研究数据 编辑:程序博客网 时间:2024/05/01 13:49
//        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");//        }

0 0
原创粉丝点击