找到应用程序的描述链接,比如:http://itunes.apple.com/gb/app/yi-dong-cai-bian/id391945719?mt=8
然后将 http:// 替换为 itms:// 或者 itms-apps://:
然后打开这个链接地址:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms://itunes.apple.com/gb/app/yi-dong-cai-bian/id391945719?mt=8"]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms-apps ://itunes.apple.com/gb/app/yi-dong-cai-bian/id391945719?mt=8"]];
这个最好在真机上面测试,在模拟器上测试,会没有效果。
说法二:
1.进入appstore中指定的应用
NSString *str = [NSString stringWithFormat:
@"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa /wa/viewContentsUserReviews?type=Purple+Software&id=%d",
myAppID ];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
其中myAppID为itunesconnect中的应用程序id
2.进入首页
NSString *str = [NSString stringWithFormat:
@"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=%@",
m_myAppID ];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];