Xcode 7 - Appirater on iOS9

598 Views Asked by At

I am using Appirator code which is an awesome tool. However I am running into an issue with iOS 9 when the review/rating is requested. It will only load the view for the app rather then pre-loading the "write a review" page. The following works perfectly with iOS8.

NSString *templateReviewURLiOS8 = @"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=APP_ID&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software";

Any help would be greatly appreciated.

2

There are 2 best solutions below

3
Beto On

Maybe you need update your URL depend of iOS version.

NSString *str;
float ver = [[[UIDevice currentDevice] systemVersion] floatValue];
 if (ver >= 7.0 && ver < 7.1) {
    str = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/app/id%@", appId];
} else if (ver >= 8.0) {
    str = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@", appId];
} else {
    str = [NSString stringWithFormat:@"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@", appId];
}
4
mourlam On
NSString *url = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=919745844&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software"];

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

Above takes me to the current version reviews page.

I assume you're using the [[UIApplication sharedApplication]openURL:] method inside Appirater instead of using in-app SKStoreProductViewController since you're passing that url. On iPhone 5C with iOS 9.0.1 built with Xcode 7.0.1 the openURL with you URL does in fact work and open the reviews page.

Do you have any reviews for the current version of your app?

I do not believe there is a way to display review page using SKStoreProductViewController.