如何直接链接到iOS上的应用评论部分

时间:2015-12-06 12:20:40

标签: ios iphone ipad app-store

这曾经工作

itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=XXXXXXXXX&pageNumber=0&sortOrdering=2

从iOS 9开始,用户收到错误消息:

  

您的请求产生了错误,[newNullReponce]

什么是新的网址结构?

由于

2 个答案:

答案 0 :(得分:1)

此代码会将您带到App Store上的应用页面。据我所知,没有办法直接进入应用评论。

NSString* appId = @"APP_ID";
NSString* appUrl = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/app/id%@", appId];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:appUrl]];

答案 1 :(得分:0)

新结构是:NSURL *url = [NSURL URLWithString:@"itms-apps://itunes.apple.com/app/id[your app id]?at=10l6dK"];

可能会有所帮助的其他说明: 这是我实现iOS应用程序评论弹出窗口的解决方案。

您可以实现在准备好时调用的UIAlert视图,因此在以下示例中,当您要触发警报时,您将调用appReviewReminder。

我想也许你可以在一个随机行为上做这件事,所以每5个中它会发出警报,跟踪用户是否已提交评论(种类)或任何方式:

-(void)appReviewReminder{

        UIAlertView *infoAlert;
         version = @"1.4.23"
        infoAlert = [[UIAlertView alloc]
                     initWithTitle: nil
                     message: [NSString stringWithFormat: @"[Your App Version] V%@\nIf you enjoy [Your App Name] take time to give us a review, please press 'App Review'.",version]
                     delegate: self
                     cancelButtonTitle: @"Maybe Later"
                     otherButtonTitles: @"Submit Feedback",
                     @"App Review",nil];

        [infoAlert show];      
    }

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {

    if (buttonIndex==0)
    {
        //"Review Later" so dismiss alert
        [self dismissViewControllerAnimated:YES completion:nil];
    }

    else if (buttonIndex==1)
    {
        //route user to your website's support page
        NSURL *url = [NSURL URLWithString:@"http://www.yourwebsite.com/contactSupport.html"];

        [[UIApplication sharedApplication] openURL:url];
    }
    else{
        //route to iOS App Store URL
        NSURL *url = [NSURL URLWithString:@"itms-apps://itunes.apple.com/app/id[your app id]?at=10l6dK"];

        [[UIApplication sharedApplication] openURL:url];

    }
}