赞
踩
打开iTunes,搜索应用的名称,点击倒三角按钮,选择拷贝链接
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"app的链接"]];
<a href="itms-apps://itunes.apple.com/cn/app/jie-zou-da-shi/id493901993?mt=8">更新</a>
window.open('itms-apps://itunes.apple.com/cn/app/jie-zou-da-shi/id493901993?mt=8');
SKStoreProductViewController *storeProductViewContorller = [[SKStoreProductViewControlleralloc] init];
//设置代理请求为当前控制器本身
storeProductViewContorller.delegate = self;
//加载一个新的视图展示
[storeProductViewContorller loadProductWithParameters:
//appId唯一的
@{SKStoreProductParameterITunesItemIdentifier : @"1049660516"} completionBlock:^(BOOL result, NSError *error) {
//block回调
if(error){
NSLog(@"error %@ with userInfo %@",error,[error userInfo]);
}else{
//模态弹出appstore
[self presentViewController:storeProductViewContorller animated:YES completion:^{
}
];
}
}]
//取消按钮监听
- (void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController{
[self dismissViewControllerAnimated:YES completion:^{
}];
}

2016/11/17
补充:跳转到评价页面:
int appID = 1118301512;
NSString *str = [NSString stringWithFormat:@"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=%d&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8",appID];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。