// 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的方法
最新推荐文章于 2020-12-11 11:16:21 发布