App应用内跳转AppStore与iTunesStore

  1. 先找到app在itunes.apple.com下的链接【此文的itunes链接是按如下方法找的】
    此文查找链接的方法
  2. 这里以QQ为例:
    itunes下的链接:https://itunes.apple.com/cn/app/id444934666?mt=8
    如果要跳转到AppStore,将协议https改成itms-apps:itms-apps://itunes.apple.com/cn/app/id444934666?mt=8
    如果要跳转到iTunesStore,将协议https改成itms:itms://itunes.apple.com/cn/app/id444934666?mt=8

具体代码如下【以QQ跳转到AppStore为例】:

1
2
NSString *url = @"itms://itunes.apple.com/cn/app/id444934666?mt=8";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];

效果如下:

AppStore
iTunesStore