App Store scoring in iOS app, three ways to summarize the pen, you can choose according to your own needs. First of all, the following three ways to achieve the scoring function.
1, the general way through the app inside open Web page form, jump to AppStore editorial review, can be rated, can be commented.
Advantages: Convenient, fast, not limited by the system version, currently the most common way.
Disadvantage: The internal Web page form load slowly, wait a long time, load failure probability is large.
2,ios 6.0 to load AppStore app info inside app
Advantage: Show speed is faster than method three block
Cons: Cannot jump directly to the comment edit page, need to manually click on Comments + edit comments
3,ios 10.0.3 New in-app scoring feature that calls system method scoring.
Advantages: No jump, in-app system bullet box, convenient and fast.
Cons: Can only be scored, and only three times a year can be used for frames.
Development steps:
Import Header File #import
1,ios 10.0.3 Call System Frame rating later
123456789101112 |
/**
* 只能评分,不能编写评论
* 有次数限制,一年只能使用三次
* 使用次数超限后,需要跳转appstore
*/
- (IBAction)systemComentBtnAction:(UIButton *)sender {
if
([SKStoreReviewController respondsToSelector:@selector(requestReview)]) {
// iOS 10.3 以上支持
//防止键盘遮挡
[[UIApplication sharedApplication].keyWindow endEditing:YES];
[SKStoreReviewController requestReview];
}
}
|
2, jump to AppStore corresponding app review page
1234567 |
/**   * rated reviews, unlimited number of   */ - (ibaction) appstorecomentbtnaction: (uibutton *) sender { nsstring * nsstringtoopen = [nsstring stringwithformat: @ "Itms-apps://itunes.apple.com/app/id%@?action=write-review" ,@ "AppID" ];//replaced with corresponding AppID [[uiapplication sharedapplication] openurl:[nsurl urlwithstring: Nsstringtoopen]]; |
3,ios 6.0 After the method, internal loading AppStore
Note: You need to sign an agent
1234567891011121314151617181920212223242526272829303132 |
/**
* 在APP内部加载App Store 展示APP信息,但不能直接跳转到评论编辑页面。
* 再加载处App Store展示页面后,需要手动点击 评论→ 撰写评论
*/
- (IBAction)webAppStoreBtnAction:(UIButton *)sender {
SKStoreProductViewController *storeProductViewContorller = [[SKStoreProductViewController alloc] init];
storeProductViewContorller.delegate = self;
//加载App Store视图展示
[storeProductViewContorller loadProductWithParameters:
@{SKStoreProductParameterITunesItemIdentifier : @
"APPID"
} completionBlock:^(BOOL result, NSError *error) {
if
(error) {
}
else
{
//模态弹出appstore
[self presentViewController:storeProductViewContorller animated:YES completion:^{
}];
}
}];
}
// 代理方法
- (
void
)productViewControllerDidFinish:(SKStoreProductViewController *)viewController {
[self dismissViewControllerAnimated:YES completion:^{
}];
}
|
iOS in-app integrated AppStore scoring feature