admin管理员组文章数量:1662335
1. 获取应用的链接地址
打开iTunes,搜索应用的名称,点击倒三角按钮,选择拷贝链接
2. 跳转
1、iOS原生应用跳转:(通过AppStore App,推荐使用)
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"app的链接"]];
2、html5应用跳转, 这里分为两种方式。一种直接写个\ 标签,一种是利用js
<a href="itms-apps://itunes.apple/cn/app/jie-zou-da-shi/id493901993?mt=8">更新</a>
window.open('itms-apps://itunes.apple/cn/app/jie-zou-da-shi/id493901993?mt=8');
3.应用内直接跳转到appstore,需要添加StoreKit,framework系统库,需要实现下面的代理方法
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/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=%d&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8",appID];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
版权声明:本文标题:ios - 跳转到AppStore某个应用详情页面 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dianzi/1729959474a1217465.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论