跳转到AppStore去评分
业务需求我们需要提醒用户去AppStore为我们的app评分,有两种方式,一种是直接通过链接打开AppStore去评分,这是比较传统的方式,也是现在大多数app都在用的一种方式,还有一种比较高大上的方式,就是present出一个模态试图控制器(只能以模态方式显示),在app内部实现评论操作
1.跳转到AppStore评分
// 1.直接使用app地址跳转
NSString *urlString = [NSString stringWithFormat:@"https://geo.itunes.apple.com/cn/app/shang-na-xue-mian-fei-sheng/id985064915?mt=8"];
//2.拼接url NSString *urlString = [NSString stringWithFormat:@"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=985064915" ];
[[UIApplication sharedApplication] openURL:urlString];
上面的这两个链接都可以实现AppStore的跳转
那么第一种方式这个链接从哪里去找呢,官方文档种有这么一句话
The value of this identifier is an instance of NSNumber, representing the iTunes identifier for the item you want the store to display when the view controller is presented.
To find a product’s iTunes identifier, go to linkmaker.itunes.apple.com and search for th