iOS App评价方式

这里只说从10.3之后的事情: 老习惯,上代码:

- (void)showAppStoreReView

{

    //仅支持iOS10.3+(需要做校验) 且每个APP内每年最多弹出3次评分alart

    if([SKStoreReviewController respondsToSelector:@selector(requestReview)]) {

        //防止键盘遮挡

        [[UIApplication sharedApplication].keyWindow endEditing:YES];

        [SKStoreReviewController requestReview];

    } else {

        //不论iOS 版本均可使用APP内部打开网页形式,跳转到App Store 直接编辑评论

        NSString *APPID = [PlistReader valueForKeyInConfig:@"APP_ID"];

        NSString *nsStringToOpen = [NSString stringWithFormat: @"itms-apps://itunes.apple.com/app/id%@?action=write-review",APPID];

        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:nsStringToOpen]];

    }

}

完事

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s