ios 直接在我的应用“率在iTunes中”链接?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3654144/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 17:40:57  来源:igfitidea点击:

Direct "rate in iTunes" link in my app?

iphoneioshyperlinkratingitunes-store

提问by Moshe

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

我在 Stackoverflow 上看到过一些帖子,这些帖子描述了如何允许用户被定向到应用商店中的应用。

Is there a way to link directlyto the rating and comments formin the App Store?

有没有办法直接链接到App Store 中的评分和评论表

采纳答案by Idan

Answers here are outdated.

这里的答案已经过时。

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

这对我有用(Xcode 5 - iOS 7 -仅适用于设备,不适用于模拟器!):

itms-apps://itunes.apple.com/app/idYOUR_APP_ID

For versions lower than iOS 7 use the old one:

对于低于 iOS 7 的版本,请使用旧版本:

itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=YOUR_APP_ID

回答by TomSwift

This IS possible using the technique described on this blog:

使用此博客中描述的技术可以做到这一点:

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

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

basically you call UIApplication openURL with the following:

基本上你调用 UIApplication openURL 如下:

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.

要在您的应用程序在应用程序商店中可用之前获取您的应用程序 ID,请使用 iTunesConnect 定义您的新应用程序 - 为其指定名称、描述、图标、屏幕截图等。一旦定义,您可以从标识符部分获取 Apple ID应用程序。

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.

我相信两者之间的区别在于第一种技术 (itms-apps://) 将直接启动 App Store 应用程序,而第二种技术 (http://) 将通过 http 网址产生的重定向间接启动它. 这必须得到证实;这只是我的回忆。

回答by Ahmet Hayrullahoglu

Simple method that I am using is;

我使用的简单方法是;

 -(void)rateApp {

     [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[@"itms-apps://itunes.apple.com/app/" stringByAppendingString: @"id547101139"]]]; }

回答by MirekE

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

您也可以将其SKStoreProductViewController用作替代品。它将在您的应用程序中打开商店。您可能比打开另一个应用程序更喜欢它,尤其是在 iPad 上。

回答by Roman Barzyczak

Thanks to Ahment swift version:

感谢 Ahment swift 版本:

            UIApplication.sharedApplication().openURL(NSURL(string: "itms-apps://itunes.apple.com/app/id951334398")!)