一.跳转到App Store评论页面
NSString *str = [NSString stringWithFormat: @"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&id=%@", AppStoreId];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
说明:
1.type :类型
2.onlyLatestVersion:最新评论
3.pageNumber:页数
4.sortOrdering:排序方式
二.APP应用内评论页面
#import <StoreKit/StoreKit.h>
@interface AboutMeViewController ()<SKStoreProductViewControllerDelegate>
- (void)loadAppStoreController{
_uploadHud =[MBProgressHUD showHUDAddedTo:self.view animated:YES];
SKStoreProductViewController *storeProductVC =[[SKStoreProductViewController alloc] init];
storeProductVC.delegate = self;
[storeProductVC loadProductWithParameters:@{SKStoreProductParameterITunesItemIdentifier: AppStoreId} completionBlock:^(BOOL result, NSError * _Nullable error) {
[_uploadHud setHidden:YES];
if (error) {
DLog(@" app store vc error:%@ and %@",error,[error userInfo]);
} else {
[self presentViewController:storeProductVC animated:YES completion:^{
}];
}
}];
}
- (void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController{
[self dismissViewControllerAnimated:YES completion:nil];
}