iOS跳转AppStore相关

作者: JerryLMJ | 来源:发表于2016-02-17 12:23 被阅读5888次

跳转到应用官方下载页

  • itms-apps://https:// 开头的应用详情页链接,跳转到AppStore
NSString * url = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=%@",@"1014939463];
或者
NSString * url = [NSString stringWithFormat:@"https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=%@",@"1014939463];
// 惊奇的发现https://开头的连接也可以跳转到appstore
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];
  • itms:// 开头的应用详情页连接,跳转到 iTunes Store,打开的仍然是应用的下载页
NSString * url = [NSString stringWithFormat:@"itms://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=%@",@"1014939463];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];

跳转到应用评分页

itms-apps://itms://开头的链接都可以,而此时https:// 开头的链接不可以

NSString * url = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@",@"1014939463"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];

版权声明:出自MajorLMJ技术博客的原创作品 ,转载时必须注明出处及相应链接!

相关文章

网友评论

  • 貓秋:请问如果有上架新版本的话,这个链接还是不变的吗?
  • _杭:app id 怎么获取?
  • CoderChou:怎么出现了好多奇怪的字符 WebObjects/MZStore.woa/wa/

本文标题:iOS跳转AppStore相关

本文链接:https://www.haomeiwen.com/subject/psqmkttx.html