去APP Store评分,下载

来源:互联网 发布:linux 复制文件覆盖 编辑:程序博客网 时间:2024/06/09 22:43
     1. 评分: 
       NSString *str = [NSString stringWithFormat: @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@", @"346703830"];  
       [[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]]; 

       2. 软件首页 
       NSString *str2 = [NSString stringWithFormat: @"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=%@", @"346703830"];  


   if ([[[UIDevicecurrentDevice]systemVersion]floatValue] >=7.0)

            {

                str2 =[NSString stringWithFormat:@"https://itunes.apple.com/cn/app/id%@?mt=8",@"346703830"];

            }


     [[UIApplication sharedApplication] openURL:[NSURL URLWithString:str2]];

       其中,红色字体部分为itunesconnect中的应用程序id。

IOS7以后有写变化. 地址参照新添加部分代码