ITunes review URL and iOS 7 (ask user to rate our app) AppStore show a blank page
IphoneApp StoreItunesIos7RatingIphone Problem Overview
Does anybody knows if the technique used to ask the user to rate our app and open for him the App Store directly on the rating page is still working on iOS 7 ?
I used to open this url from my app :
itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=353372460&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software
But it looks like it's not working anymore (AppStore show a blank page). I have also tried this url wihout luck:
http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?pageNumber=0&sortOrdering=1&type=Purple+Software&mt=8&id=353372460
Iphone Solutions
Solution 1 - Iphone
Starting with iOS7 the URL has changed and cannot direct for the review page but only to the app
itms-apps://itunes.apple.com/app/idAPP_ID
Where APP_ID need to be replaced with your Application ID. Based on the App ID from the question it would be the following
itms-apps://itunes.apple.com/app/id353372460
Notice the id in front of the number ... that string is is id353372460, not just 353372460
For anything pre iOS7 the 'old' URL needs to be used, only those could get you straight to the review page. You should also take note that these calls will only work on devices. Running them in the simulator will do nothing since the simulator does not have the App Store app installed.
Have a look at for instance Appirater for an implementation. https://github.com/arashpayan/appirater
Can't help you with phonegap specifics (never used it). But it basically comes down to checking the iOS version your user is running and then either use the old URL or then new iOS7 URL.
Solution 2 - Iphone
The following URL works perfectly on iOS 7.1:
http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=xxxxxxxx&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8
where the xxxxxxxx
is your app ID.
UPDATE. Works on iOS 9.3.4 and iOS 10 GM (by Jeet)
Solution 3 - Iphone
This works on my end (Xcode 5 - iOS 7 - Device!):
itms-apps://itunes.apple.com/app/idYOUR_APP_ID
For versions lower than iOS 7 use the old one:
itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=YOUR_APP_ID
Solution 4 - Iphone
One-Line-of-Code Simple Alternative: ** Also See Simulator Comments Below **
http://itunes.apple.com/app/idAPP_ID
EDIT: Now that iOS 7.1 allows direct-link to the Reviews tab in the App Store, it's worth investing the extra lines of code to get there directly: see other answers for the rest.
here we are using http:
instead of itms-apps:
, let iOS do the rest of the work
I get the same results testing on iOS 6.1 & 7 devices (iPad/iPhone/iPod touch 4)
Specifically, this shortcut, for iOS 6 takes the user to the Details
tab and not the Reviews
tab.
The Purple+Software
link gets the user all the way to the Reviews tab in iOS 6, which is obviously preferred if you know how to check the OS.
Important note: This will cause error in the simulator for iOS 5.1, 6.1 and 7.
Cannot Open Page Safari can not open the page because the address is invalid (we know it is a valid URL outside the simulator, on any browser)
Just to be clear: On iOS 7: http://
provides the same experience as itms-apps:
with no noticeable delay.
* keep in mind that the simulator behavior noted above. This is not entire dissimilar from trying to access the camera via a simulator: the simulator is not the place to test it. *
Solution 5 - Iphone
It's not clear which versions of iOS this is supported by, but as part of iOS 10.3 there's a new query parameter that can be added to the URL: action=write-review
. I have tested this on iOS 10.2 and 9.3.5 and it works. However, it does not work on iOS 7.1.2, so support was added between iOS 8.0 and 9.3.5. Further investigation is required!
Example: https://itunes.apple.com/app/id929726748?action=write-review&mt=8
This will open the "Write a Review" dialogue, rather than just showing the review tab.
Solution 6 - Iphone
Opening review page directly from app is possible in iOS7. Please use the following url...
itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=YOUR_APP_ID
This will definitely works.. :)
Solution 7 - Iphone
+ (NSString *)getReviewUrlByAppId:(int)appId
{
NSString *templateReviewURL = @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=APP_ID";
NSString *templateReviewURLiOS7 = @"itms-apps://itunes.apple.com/app/idAPP_ID";
NSString *templateReviewURLiOS8 = @"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=APP_ID&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software";
//ios7 before
NSString *reviewURL = [templateReviewURL stringByReplacingOccurrencesOfString:@"APP_ID" withString:[NSString stringWithFormat:@"%d", appId]];
// iOS 7 needs a different templateReviewURL @see https://github.com/arashpayan/appirater/issues/131
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0 && [[[UIDevice currentDevice] systemVersion] floatValue] < 7.1)
{
reviewURL = [templateReviewURLiOS7 stringByReplacingOccurrencesOfString:@"APP_ID" withString:[NSString stringWithFormat:@"%d", appId]];
}
// iOS 8 needs a different templateReviewURL also @see https://github.com/arashpayan/appirater/issues/182
else if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
{
reviewURL = [templateReviewURLiOS8 stringByReplacingOccurrencesOfString:@"APP_ID" withString:[NSString stringWithFormat:@"%d", appId]];
}
return reviewURL;
}
Solution 8 - Iphone
The review link has once again broken in iOS9. In doing some experimenting, I figured out that Apple reverted it back to how it was before iOS7. So you have to do:
itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=247423477&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software
Where 247423477
is your 9 digit app ID (the main difference is you have to append &onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software
after the app ID).
Solution 9 - Iphone
All the answers above have now been deprecated (iOS 7, but may work) thus, I provide the new way Apple recommends to provide links to the Apps. The link for your App is the one from iTunes (use Copy Link), this one is recommended for use in code:
Swift 3.0
let path = URL(string: "https://itunes.apple.com/us/app/calcfast/id876781417?mt=8")
UIApplication.shared.open(path!)
Or better -- treat the optional correctly and handle the possibility of not being able to reach the link:
if let path = URL(string: "https://itunes.apple.com/us/app/calcfast/id876781417?mt=8") {
UIApplication.shared.open(path) {
(didOpen:Bool) in
if !didOpen {
print("Error opening:\(path.absoluteString)")
}
}
}
Objective-C
#define APP_URL_STRING @"https://itunes.apple.com/us/app/calcfast/id876781417?mt=8"
then you can call APP_URL_STRING
in your code:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: APP_URL_STRING] options:@{} completionHandler:nil];
Note, that this is the recommended way now by Apple, as the previous method of processing redirect links has been deprecated and are not supported.
The link for all your Apps, if you have more than one:
#define MYCOMPANY_URL_PATH @"http://appstore.com/mycompany"
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: MYCOMPANY_URL_PATH] options:@{} completionHandler:nil];
The App link above is recommended for use in code or links that are not seen directly by the user. If you want to provide link that may be seen and remembered by the user then use the following:
http://appstore.com/calcfast
Solution 10 - Iphone
Using this URL was the perfect solution for me. It takes the user directly to the Write a Review section
. Credits to @Joseph Duffy.
For a sample code try this :
Swift 3, Xcode 8.2.1 :
let openAppStoreForRating = "itms-apps://itunes.apple.com/gb/app/id1136613532?action=write-review&mt=8"
if UIApplication.shared.canOpenURL(URL(string: openAppStoreForRating)!) {
UIApplication.shared.openURL(URL(string: openAppStoreForRating)!)
} else {
showAlert(title: "Cannot open AppStore",message: "Please select our app from the AppStore and write a review for us. Thanks!!")
}
Here showAlert is a custom function for an UIAlertController
.
Solution 11 - Iphone
I have this to get the Product ID automatically and generate App Store Review and Product page links.
- (void) getAppStoreLinks {
productID = [[NSUserDefaults standardUserDefaults] objectForKey:@"productID"]; //NSNumber instance variable
appStoreReviewLink = [[NSUserDefaults standardUserDefaults] objectForKey:@"appStoreReviewLink"]; //NSString instance variable
appStoreLink = [[NSUserDefaults standardUserDefaults] objectForKey:@"appStoreLink"]; //NSString instance variable
if (!productID || !appStoreReviewLink || !appStoreLink) {
NSString *iTunesServiceURL = [NSString stringWithFormat:@"https://itunes.apple.com/lookup?bundleId=%@", [NSBundle mainBundle].bundleIdentifier];
NSURLSession *sharedSes = [NSURLSession sharedSession];
[[sharedSes dataTaskWithURL:[NSURL URLWithString:iTunesServiceURL]
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
NSInteger statusCode = ((NSHTTPURLResponse *)response).statusCode;
if (data && statusCode == 200) {
id json = [[NSJSONSerialization JSONObjectWithData:data options:(NSJSONReadingOptions)0 error:nil][@"results"] lastObject];
//productID should be NSNumber but integerValue also work with NSString
productID = json[@"trackId"];
if (productID) {
appStoreReviewLink = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=%d&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8",productID.integerValue];
appStoreLink = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/app/id%d",productID.integerValue];
[[NSUserDefaults standardUserDefaults] setObject:productID forKey:@"productID"];
[[NSUserDefaults standardUserDefaults] setObject:appStoreReviewLink forKey:@"appStoreReviewLink"];
[[NSUserDefaults standardUserDefaults] setObject:appStoreLink forKey:@"appStoreLink"];
}
} else if (statusCode >= 400) {
NSLog(@"Error:%@",error.description);
}
}
] resume];
}
}
Open app's Review Page
- (IBAction) rateButton: (id)sender {
NSString *appStoreReviewLink = appStoreReviewLink;
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:appStoreReviewLink]];
}
Open app's App Store page
- (IBAction) openAppPageButton: (id)sender {
NSString *appStoreLink = appStoreLink;
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: appStoreLink]];
}
Solution 12 - Iphone
It is said that this bug will be fixed on iOS7.1. Read here on the corona forum, and here on the iPhoneDevSDK.