Direct “rate in iTunes” link in my app?

2019-01-05 08:15发布

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?

5条回答
乱世女痞
2楼-- · 2019-01-05 08:26

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
查看更多
Root(大扎)
3楼-- · 2019-01-05 08:29

Thanks to Ahment swift version:

            UIApplication.sharedApplication().openURL(NSURL(string: "itms-apps://itunes.apple.com/app/id951334398")!)
查看更多
Fickle 薄情
4楼-- · 2019-01-05 08:32

Simple method that I am using is;

 -(void)rateApp {

     [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[@"itms-apps://itunes.apple.com/app/" stringByAppendingString: @"id547101139"]]]; }
查看更多
Explosion°爆炸
5楼-- · 2019-01-05 08:39

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.

查看更多
混吃等死
6楼-- · 2019-01-05 08:42

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.

查看更多
登录 后发表回答