159

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
AstroCB
  • 12,337
  • 20
  • 57
  • 73
Samuel
  • 5,439
  • 6
  • 31
  • 43
  • After looking at the UAAppReviewManager's source code, it looks like there is indeed a pb with iOS7. So they use the standard App URL, so the user need to search for the rate button :-/ – Samuel Sep 19 '13 at 22:14
  • Looks like review link for ios 7 does not work. I will change my code to the regular app link url. The user will have to click the review button. – Emmy Nov 02 '13 at 04:37
  • 4
    The second link you posted now works on iOS 7! Goes right to the review page – Maximilian Litteral Mar 30 '14 at 21:11
  • for me ....first URL seems to working. I just replaced my id number – Nilesh Kumar Sep 13 '16 at 12:38
  • Possible duplicate of [App store link for "rate/review this app"](http://stackoverflow.com/questions/3124080/app-store-link-for-rate-review-this-app) – g00glen00b Mar 08 '17 at 10:30

12 Answers12

197

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.

Fattie
  • 27,874
  • 70
  • 431
  • 719
Frank
  • 3,376
  • 1
  • 23
  • 23
  • 18
    Actually this opens the app and not the review tab. – Idan Sep 20 '13 at 00:44
  • 3
    Yes that's true, but under iOS7 for now that's the best that can be achieved at the moment. – Frank Sep 20 '13 at 01:15
  • The new Facebook app shows the app store page **inside** the app itself in iOS 7. Anyone know how they do that? – EricS Sep 21 '13 at 16:27
  • @EricS That is done by using the SKStoreProductViewController class. Both iRate and Appirater support this method. You can also read about it in this tutorial http://mobile.tutsplus.com/tutorials/iphone/displaying-app-store-products-in-app/ – Frank Sep 21 '13 at 20:13
  • 1
    Unlike in iRate, you MUST use the link above with the /LANGUAGE/app/idAPP_ID information – Dan Sep 21 '13 at 23:15
  • Strange Storekit code didn't bring up app page at all for me on ios7; had to put separate condition to use URL instead of SK on ios7 – Dan Sep 22 '13 at 07:50
  • 6
    You want to remove the language, Appirater also has same problem if the device is set to a language that does not equate to iTunes store you get a blank page (e.g. British english), if you remove the language bit it still works and store opens in the owners language. – Chris Sep 22 '13 at 18:18
  • @EricS Got`SKStoreProductViewController` to pull up the app store in-app in iOS 7. But I am finding that I cannot physically press the button "Write a Review" in it! Every other button works in the modal view except that button. Has anyone else noticed this??? I also checked FB app on iOS 7 which uses `SKStoreProductViewController` and I also cannot press the "Write a Review" button on it. – nvrtd frst Sep 23 '13 at 20:18
  • I just tried it in the Facebook app and am having the same issue. Apparently Apple disabled this in iOS 7. https://github.com/UrbanApps/UAAppReviewManager says "The SKStoreProductViewController does not allow the user to write a review (as of iOS 7 GM)!" – EricS Sep 24 '13 at 05:01
  • Can I implement Rate us/ Review in very first app version? – Gajendra K Chauhan Apr 23 '14 at 03:42
166

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)

mkll
  • 2,058
  • 1
  • 15
  • 21
47

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
Andrew Barber
  • 39,603
  • 20
  • 94
  • 123
Idan
  • 9,880
  • 10
  • 47
  • 76
  • 1
    This gives an blank screen on my iOS7 devices (using Xcode 5), this was the URL I am still using for iOS6. For iOS 7 I am using the one detailed in my answer. Strange that it is working for you. – Frank Sep 20 '13 at 01:04
  • @Frank how do you open this link? I'm using iRate and it's using this link, maybe try to use it and check what exactly is the difference from your code. – Idan Sep 20 '13 at 09:58
  • 2
    I am using the following code `[[UIApplication sharedApplication] openURL:[NSURL URLWithString:ITUNES_APP_URL_IOS7]];` – Frank Sep 20 '13 at 11:47
  • 1
    self.appStoreID doesn't even compile – ngb Jan 11 '14 at 01:06
  • @ngb You are right, I assume using iRate but it is too complicate just for this reason. I removed & fix it. Thanks! – Idan Jan 11 '14 at 09:33
  • 1
    It's broken again in iOS 8 DP5. Start reporting this as a bug and hope they fix by production! Else we will be waiting until 8.1 again. – Cliff Ribaudo Aug 06 '14 at 14:42
  • @CliffRibaudo Yea, The smart people removed the fixes and I'm not going to write that again. Sorry. – Idan Aug 06 '14 at 19:44
  • @idan, use our service (AskingPoint) and let us worry about it for you. We handle it server side and can change it on the fly so you don't have to put out a release to update :) – Cliff Ribaudo Aug 07 '14 at 12:11
  • @CliffRibaudo I know how to do that to work always and attached a simple library that check all this at run time (covers iOS 8 also) but people here decided to remove that from my answer. I definitely know that the answer now isn't correct and won't always get the necessary results. i.e. link would be broken on many cases. Changing that from the server side doesn't really help because sometimes it's OS related or device related. – Idan Aug 07 '14 at 15:21
18

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. *

  • 1
    I am not sure how exactly are you answering the question. This link you provided doesn't do what the OP is asking for, that is opening the "reviews" page in the App Store. Linking directly to the app itself is trivial. – Asem H. Oct 23 '13 at 09:04
  • Given that you *can't* link directly to Reviews in iOS7, this seems like a perfectly reasonable solution. – Nick Cecil Oct 25 '13 at 18:18
  • While currently true, there's no guarantee that http will continue to route to the App Store app. Apple may decide in the future to send http app links to Safari, who knows? Safer to use the direct protocol. – poetmountain Oct 26 '13 at 01:52
  • Except that Apple changed the direct protocol so it doesn't work in iOS7 unless you use a different format. So not really "safer" at all. – Real World Nov 18 '13 at 10:53
  • 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) Yes!!! This was driving me nuts!! only work on a device not the simulator as of 1/3/14 – Dave Kozikowski Jan 03 '14 at 15:08
  • 1
    Regarding `http:` vs `itms-apps:` I was able to link directly to the reviews tab with `itms-apps` and not with `http` on iOS 7.1.1. – zekel Jul 04 '14 at 20:19
18

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.

Joseph Duffy
  • 4,566
  • 9
  • 38
  • 68
  • 2
    Cheers bro :) This was the best solution so far. To the point and completely serves the purpose. For me this is the acceptable answer. Tested to be working on 9.3.5 and iOS 10.2.1. Directly opens write a review. I used this : itms-apps://itunes.apple.com/gb/app/id1136613532?action=write-review&mt=8 , to make the user directly write the review. – Ankit Kumar Gupta Mar 08 '17 at 10:14
  • ...but doesn't gb refer to Great Britain? If so, this will refer all users to the UK App Store? – Robert Gummesson Jun 10 '17 at 06:45
  • @Robert Yeh, the link I originally had /gb at the start. I think it would still open to the user's store, but I've removed it from the answer – Joseph Duffy Jun 20 '17 at 17:26
  • It works in iOS10, but doesn't seem to be working in iOS11 (using beta 9). Any ideas if something changed? – Z S Sep 04 '17 at 11:28
  • This works in iOS 11.1.1. Thanks! Should be the accepted answer, @astrocb – Vexir Nov 13 '17 at 20:30
17

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.. :)

Murali
  • 1,869
  • 1
  • 14
  • 22
9
+ (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;
}
Mohsin Khubaib Ahmed
  • 1,008
  • 16
  • 32
Will
  • 1,573
  • 14
  • 13
  • 1
    [Appirater](https://github.com/arashpayan/appirater/blob/master/Appirater.m#L642) has been updated again to fix another issue. The main change consisted of changing the check from `< 7.1` to `< 8.0` so that the `templateReviewURLiOS7` link is used for all 7.x iOS versions rather than using the old link for everything between >=7.1 and <8.0. – Markus A. Jul 29 '15 at 00:19
9

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).

Ser Pounce
  • 14,196
  • 18
  • 84
  • 169
5

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

Sverrisson
  • 17,970
  • 5
  • 66
  • 62
  • 3
    this doesn't link to the reviews page – ngb Aug 16 '14 at 06:37
  • @ngb you can only link to the Apps or the developer page. Please when down voting give a valid reason or failure. I am not showing links to the review page, but the user can easily click on rate. – Sverrisson Aug 16 '14 at 17:30
  • 1
    This is the correct Apple Recommended method. Anything else is a hack. – Martin Marconcini Jan 11 '16 at 21:08
  • @Bingo What do you mean? The link I provide ends in &mt=8 ans links to the review page. In my answer I am referring to what Apple recommends, your link may work now and maybe in your case, but does it work for users in another country or you are sure it will not change? – Sverrisson Jul 09 '16 at 02:30
4

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.

Ankit Kumar Gupta
  • 3,994
  • 4
  • 31
  • 54
3

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]];
 }
Tibidabo
  • 21,461
  • 5
  • 90
  • 86
2

It is said that this bug will be fixed on iOS7.1. Read here on the corona forum, and here on the iPhoneDevSDK.

Mohsin Khubaib Ahmed
  • 1,008
  • 16
  • 32
Joselito
  • 57
  • 4
  • 3
    Unfortunately iOS 7.1 is now out and it is still not working. – user1139733 Mar 11 '14 at 20:04
  • 2
    It is working for me on iOS 7.1 again (going to Reviews page directly) and others have indicated the same in the devsdk link. For me, I only had to change the scheme from itms-apps to http and it works perfectly on iOS 7.1. On iOS 7.0 it still only goes to the main app page, but at least the http link works, unlike the old itms-apps link which would just show a white page. – stonemonk Apr 11 '14 at 05:52
  • I can now positively confirm that the "old" (Purple+Software) method is working flawlessly in iOS7.1 You can see a proof in my app: http://j.mp/josegg On main screen click "settings" -> click "Get Free Js" -> then click "Rate Us" -> you will be taken straight to the review tab of my app's page on the app store (obviously only works for iOS 7.1+ or iOS 6.1.4-) – Joselito Apr 22 '14 at 15:43