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];
}