58

I've seen posts here on Stackoverflow that describe how to allow users to be directed to apps on the app store.

Is there a way to link directly to the rating and comments form in the App Store?

Moshe
  • 57,511
  • 78
  • 272
  • 425
  • i don't think this is possible as far as I am aware - I haven't seen this in any apps either - they usually provide links to the store, which will then launch the AppStore app. – Pripyat Sep 06 '10 at 22:18
  • 1
    possible duplicate of [App store link for "rate/review this app"](http://stackoverflow.com/questions/3124080/app-store-link-for-rate-review-this-app) – Brad Larson Sep 07 '10 at 16:50
  • 1
    See also [UI for rating an app during deletion](http://stackoverflow.com/questions/3315765/ui-for-rating-an-app-during-deletion) – Brad Larson Sep 07 '10 at 16:51
  • I wrote a library for doing this with minimal effort on your part: https://github.com/nicklockwood/iRate I'd recommend using a library rather than rolling your own solution. It may seem like a simple problem but the library takes care of a whole bunch of extra stuff, like automatically prompting the user based on time installed or number of uses, etc, and ensures that the user isn't prompted unless they have a network connection. – Nick Lockwood Jun 08 '12 at 16:12
  • AskingPoint has a free App Analytics API that includes a Rating Widget that will take users directly to your App Store page for you. [www.askingpoint.com](http://www.askingpoint.com) - It uses your App analytics to only ask your best users to rate you. - Settings for who sees it are adjusted from account dashboard in real-time. - Its localized into 32 languages. Full disclosure, im a Co-Founder. But check it out it's free. – Cliff Ribaudo Dec 13 '12 at 12:54

5 Answers5

97

This IS possible using the technique described on this blog:

http://www.memention.com/blog/2009/09/03/Open-Reviews.html

basically you call UIApplication openURL with the following:

NSString* url = [NSString stringWithFormat: @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@", myAppID];
[[UIApplication sharedApplication] openURL: [NSURL URLWithString: url]];

To get your app ID before your app is available in the app store, use iTunesConnect to define your new app - give it a name, description, icon, screenshots, etc. Once defined, you can get the Apple ID from the Identifiers section for the app.

EDIT:

Here is a secondary url/method that works:

NSString* url = [NSString stringWithFormat:  @"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=%@&pageNumber=0&sortOrdering=1&type=Purple+Software&mt=8", appid];

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

I believe the difference between the two is that the first technique (itms-apps://) will launch the App Store app directly while the second one (http://) will launch it indirectly via a redirect resulting from the http web URL. This would have to be confirmed; this is only my recollection.

TomSwift
  • 39,369
  • 12
  • 121
  • 149
  • 1
    @Moshe - it would be great if you could mark this as the correct answer if it worked out for you. – TomSwift Jan 24 '11 at 16:26
  • 59
    Note - the "type=Purple+Software" *has* to be there and it *has* to be literally "Purple Software" - it's not the name of your company, it's a codename for iPhone applications :) I wasted an hour before I figured this out... – Kuba Suder Oct 24 '11 at 11:22
  • 1
    Is there a difference between method 1 and method 2 in your answer? If so, could you specify that in the answer? If not, could you specify that in the answer? :) – Josh Brown Aug 28 '12 at 19:09
  • The first one doesn't work with Cordova/PhoneGap and `window.open()` but the 2nd one does. – Timo Ernst Oct 14 '15 at 19:12
20

Answers here are outdated.

This works on my end (Xcode 5 - iOS 7 - works only on Device, not simulator!):

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
Mojo66
  • 1,109
  • 12
  • 21
Idan
  • 9,880
  • 10
  • 47
  • 76
  • Can we do this rating without redirecting to appstore?Like just pass the value to some api? – abhimuralidharan Jul 13 '16 at 04:40
  • @abhi1992 Currently there is no way to do that. I don't think Apple would give this kind of option to developers in the future at least not thorough direct API without an apple OS screen. – Idan Jul 13 '16 at 05:00
2

Simple method that I am using is;

 -(void)rateApp {

     [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[@"itms-apps://itunes.apple.com/app/" stringByAppendingString: @"id547101139"]]]; }
Vineet Singh
  • 4,009
  • 1
  • 28
  • 39
1

You can also use SKStoreProductViewController as an alternative. It will open the store in your app. You may like it better than opening another app, especially on iPads.

MirekE
  • 11,515
  • 5
  • 35
  • 28
0

Thanks to Ahment swift version:

            UIApplication.sharedApplication().openURL(NSURL(string: "itms-apps://itunes.apple.com/app/id951334398")!)
Roman Barzyczak
  • 3,785
  • 1
  • 30
  • 44