如何在iOS中直接链接到应用程序评论部分

4

之前可以正常运行

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

自从 iOS 9 版本以后,用户会收到一个错误提示信息:

Your request produced an error, [newNullReponce]

请问新的 URL 结构是什么?

谢谢。

2个回答

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]];

是的,那是我现在使用的方法,而且它有效,但用户必须在最初的链接后点击“评论”,有点遗憾。 - Andy Jay

0
新的结构是:NSURL *url = [NSURL URLWithString:@"itms-apps://itunes.apple.com/app/id[your app id]?at=10l6dK"]; 附加说明可能有所帮助: 这是我实现iOS应用程序评论弹出窗口的解决方案。
您可以只实现一个UIAlert视图,当您准备好时调用它,因此在以下示例中,您将在想要触发警报时调用appReviewReminder。
我认为也许您可以以随机行为的方式执行它,以便每5个中的1个会发出警报,跟踪用户是否已提交评论(某种程度上),或任何其他方式:
-(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];

    }
}

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接