NSString *appstoreUrlString = [NSString stringWithFormat:
@"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@",
m_appleID ];//这是你们自己app在iTunes的id,可以在iTunes查询到
NSURL * url = [NSURL URLWithString:appstoreUrlString];
if ([[UIApplication sharedApplication] canOpenURL:url])
{
[[UIApplication sharedApplication]openURL:url];
}
else
{
NSLog(@"can not open");
}
//跳转到AppStore页面
https://itunes.apple.com/cn/app/id1144816653?mt=8
iOS10.3以后支持APP内进行评论(注意:只能是发布环境才能提交,测试环境不行的)
#import <StoreKit/StoreKit.h>
if([SKStoreReviewController respondsToSelector:@selector(requestReview)]){
[SKStoreReviewController requestReview];
}else{
NSString * nsStringToOpen = [NSString stringWithFormat: @"itms-apps://itunes.apple.com/app/id%@?action=write-review",@"583742532"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:nsStringToOpen]];
}
苹果文档