美文网首页iOS 开发iOS开发札记iOS Developer
【iOS 开发】App 跳转到 AppStore

【iOS 开发】App 跳转到 AppStore

作者: 爱吃鸭梨的猫 | 来源:发表于2017-03-15 12:20 被阅读130次
AppStore

下面罗列了三种从 App 跳转到 AppStore 的方法,以下网址中将 id 后面的数字改为自己 App 的 id 即可。


1. 通过浏览器输入网址跳转到 AppStore

http://itunes.apple.com/us/app/id1138609280

2. App 内部通过代码直接跳转到 AppStore

NSURL *url = [NSURL URLWithString:@"itms-apps://itunes.apple.com/cn/app/jie-zou-da-shi/id1138609280?mt=8"];
  
if ([[UIApplication sharedApplication] canOpenURL:url]) {
    
    [[UIApplication sharedApplication] openURL:url];
}

3. App 内部通过代码跳转到 AppStore 的评论区

NSURL *url = [NSURL URLWithString:@"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=1138609280"];
  
if ([[UIApplication sharedApplication] canOpenURL:url]) {
    
    [[UIApplication sharedApplication] openURL:url];
}

将来的你,一定会感激现在拼命的自己,愿自己与读者的开发之路无限美好。

我的传送门: 博客简书微博GitHub

相关文章

网友评论

    本文标题:【iOS 开发】App 跳转到 AppStore

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