Direct "rate in iTunes" link in my app?
Asked Answered
P

5

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?

Pendley answered 6/9, 2010 at 20:31 Comment(5)
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.Expressly
possible duplicate of App store link for "rate/review this app"Peculiarize
See also UI for rating an app during deletionPeculiarize
I wrote a library for doing this with minimal effort on your part: 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.Osvaldooswal
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 - 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.Rheotaxis
A
19

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
Amniocentesis answered 26/12, 2013 at 16:55 Comment(2)
Can we do this rating without redirecting to appstore?Like just pass the value to some api?Ousel
@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.Amniocentesis
H
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.

Headline answered 7/12, 2010 at 23:1 Comment(4)
@Pendley - it would be great if you could mark this as the correct answer if it worked out for you.Headline
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...Seymour
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? :)Caitlyncaitrin
The first one doesn't work with Cordova/PhoneGap and window.open() but the 2nd one does.Flong
A
19

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
Amniocentesis answered 26/12, 2013 at 16:55 Comment(2)
Can we do this rating without redirecting to appstore?Like just pass the value to some api?Ousel
@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.Amniocentesis
W
2

Simple method that I am using is;

 -(void)rateApp {

     [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[@"itms-apps://itunes.apple.com/app/" stringByAppendingString: @"id547101139"]]]; }
Wehrle answered 13/7, 2014 at 11:22 Comment(0)
S
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.

Softener answered 5/6, 2016 at 23:10 Comment(0)
C
0

Thanks to Ahment swift version:

            UIApplication.sharedApplication().openURL(NSURL(string: "itms-apps://itunes.apple.com/app/id951334398")!)
Copyedit answered 12/10, 2015 at 22:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.