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