app store评价
[SKStoreReviewController requestReview];
应用内展示app store
//应用内显示其他app 下载
- (void)showAppID:(NSString *)appId{
SKStoreProductViewController *product = [[SKStoreProductViewController alloc] init];
product.delegate = self;
__weak typeof(self) weakSelf = self;
[product loadProductWithParameters:@{SKStoreProductParameterITunesItemIdentifier : appId} completionBlock:^(BOOL result, NSError * _Nullable error) {
if (error) {
NSLog(@"result: %d, error: %@", result, error.localizedDescription);
} else {
[weakSelf presentViewController:product animated:YES completion:nil];
}
}];
}
//回调
- (void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController {
[viewController dismissViewControllerAnimated:YES completion:nil];
}