// 1. 登录iTunes Connect,在‘App信息’中的‘额外信息’选项中点击’在AppStore中查看‘
// 通过打开的url找到应用程序的描述链接,比如:https://itunes.apple.com/us/app/yi-yuan-dian/id1106335106?l=zh&ls=1&mt=8
// 2. 代码如下:
- (void)showAppUpgradeView
{
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"版本更新" message:@"发现新版本,立即前往App Store下载吧" delegate:self cancelButtonTitle:@"暂不更新" otherButtonTitles:@"前往下载", nil];
[alertView show];
}
#pragma mark - UIAlertViewDelegate
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (alertView.cancelButtonIndex == buttonIndex) {
return;
}
// appStoreUrl是第一步拿到的app描述链接
NSString *appStoreUrl = @"https://itunes.apple.com/us/app/yi-yuan-dian/id1106335106?l=zh&ls=1&mt=8";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:appStoreUrl]];
}
在iOS应用中直接跳转到AppStore的方法
最新推荐文章于 2023-12-07 12:07:12 发布
本文介绍了一种iOS应用内提示用户进行版本更新的方法,并实现了点击后直接跳转到AppStore的应用页面功能。主要步骤包括:登录iTunesConnect获取应用描述链接,使用UIAlertView展示更新提示,以及通过UIApplication打开AppStore。
468

被折叠的 条评论
为什么被折叠?



