之前可以正常运行
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 结构是什么?
谢谢。
NSString* appId = @"APP_ID";
NSString* appUrl = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/app/id%@", appId];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:appUrl]];
NSURL *url = [NSURL URLWithString:@"itms-apps://itunes.apple.com/app/id[your app id]?at=10l6dK"];
附加说明可能有所帮助:
这是我实现iOS应用程序评论弹出窗口的解决方案。-(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];
}
}