ios点击链接直接跳转到 App Store 指定应用下载页面
2016-06-03 10:33
906 查看
//跳转到应用页面
NSString *str = [NSString stringWithFormat:@"http://itunes.apple.com/us/app/id%d",appid];
[[UIApplication sharedApplication] openURL:[NSURL urlWithString:str]];
//跳转到评价页面
NSString *str = [NSString stringWithFormat: @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id;=%d", appid];
[[UIApplication sharedApplication] openURL:[NSURL urlWithString:str]];
必须在真机上才有效,模拟机上无效。
如果评论页面无法打开appstore,用下面这行代码
NSString *str = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&id=%@",appID];
[[UIApplication sharedApplication] openURL:[NSURL urlWithString:str]];
NSString *str = [NSString stringWithFormat:@"http://itunes.apple.com/us/app/id%d",appid];
[[UIApplication sharedApplication] openURL:[NSURL urlWithString:str]];
//跳转到评价页面
NSString *str = [NSString stringWithFormat: @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id;=%d", appid];
[[UIApplication sharedApplication] openURL:[NSURL urlWithString:str]];
必须在真机上才有效,模拟机上无效。
如果评论页面无法打开appstore,用下面这行代码
NSString *str = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&id=%@",appID];
[[UIApplication sharedApplication] openURL:[NSURL urlWithString:str]];
相关文章推荐
- android CoordinatorLayout使用
- Android onLowMemory()和onTrimMemory()
- CodingNet - Learning - 6
- Android自定义标题栏异常You cannot combine custom titles with other title features
- android根文件系统目录结构
- SULogger:iOS日志可视化工具
- 动画开源库NineOldAndroids
- 清理 iOS 项目不用的图片资源
- android studio logcat一闪而过
- GitHub前50名的Objective-C动画相关库
- 清理 iOS 项目不用的图片资源
- iOS_如何画1px的线
- android 安装后首次启动的欢迎页面的总结和demo
- GitHub前50名的Objective-C动画相关库
- Android 自定义view (一)——attr 理解
- Android绘图之PathEffect
- android横竖屏切换
- Android : AlarmManager
- Android APP 禁用横竖屏切换
- object-c中#import #include @class的区别