iTunes APP 跳转

2019-05-28  本文已影响0人  Albert新荣
#define APPID @"Apple ID"

//1、cn代表中国。在Safari浏览器打开链接是中文介绍
 NSString *urlStr = [NSString stringWithFormat:@"https://itunes.apple.com/cn/app/id%@", APPID];
        
 //2、us代表美国。在Safari浏览器打开链接是英文介绍
 NSString *urlStr = [NSString stringWithFormat:@"https://itunes.apple.com/us/app/id%@", APPID];
        
 //3、和1跳转相同
 NSString *urlStr = [NSString stringWithFormat:@"https://itunes.apple.com/cn/app/apple-store/id%@", APPID];
        
 //4、和2跳转相同
 NSString *urlStr = [NSString stringWithFormat:@"https://itunes.apple.com/app/id%@", APPID];
        
 //5、以 itms-apps:// 或 https:// 开头的应用详情页链接,跳转到AppStore
 NSString *urlStr = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=%@", APPID];
        
 //6、以 itms:// 开头的应用详情页连接,会跳转到 iTunes Store,打开的仍然是应用的下载页
 NSString *urlStr = [NSString stringWithFormat:@"itms://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=%@", APPID];

 //打开链接地址
 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlStr]];

上一篇下一篇

猜你喜欢

热点阅读