2 weixin 38762681 weixin_38762681 于 2017.09.15 14:46 提问

ios 版本更新无法跳转至App Store

App Store 下载连接里有中文

[UIApplication sharedApplication] openURL: 无法跳转至 App Store

2个回答

oyljerry
oyljerry   Ds   Rxr 2017.09.15 15:39

你中文地址要变成拼音的,你可以去App store找到你的App只有英文字母的URL

Margaret_MO
Margaret_MO   2017.09.22 16:21

https://itunes.apple.com/lookup?id=1166487033(你的AppID)

post network 这个网址, 返回的Data:
NSArray *infoArray = [data objectForKey:@"results"];
if ([infoArray count]) {
NSDictionary *releaseInfo = [infoArray objectAtIndex:0];
NSString *lastVersion = [releaseInfo objectForKey:@"version"];
NSString *trackViewUrl = [releaseInfo objectForKey:@"trackViewUrl"];
if ([KBTool compareEditionNumber:lastVersion localNumber:kAPP_VERSION]) {
[KBTool showAlertWithTitle:@"更新" message:@"有新的版本更新,是否前往更新?" btnTitleArr:@[@"立即更新",@"以后再说"] onBlock:^(NSInteger index) {
if (index==0) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:trackViewUrl]];
}
}];
}
}

Csdn user default icon
上传中...
上传图片
插入图片