App 应用通过网页打开 App Store


    NSURL *url = nil;
    if ([[[UIDevice currentDevice] systemVersion] intValue] >= 7.0) {
    //iOS7 使用旧的网址跳转到 App Store 是一个 blank 页,所以判断下设备系统版本,如果是iOS7之后的,则跳转到 App 的详情页
        url = [NSURL URLWithString:[NSString stringWithFormat:@"https://itunes.apple.com/cn/app/id%@?mt=8", appId]];

    }else{
        url = [NSURL URLWithString:[NSString  stringWithFormat: @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@", appId]];
    }
    if ([[UIApplication sharedApplication] canOpenURL:url]) {
        [[UIApplication sharedApplication] openURL:url];
    }

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM