我想把一个“率/审查这个应用程序”功能到我的应用程序。
是否存在一种方法能够直接链接到应用商店中他们评论应用的屏幕?所以用户不需要点击主应用程序链接。谢谢。
编辑:由于缺乏回应,开始赏金。为了确保这一点非常清楚:我知道我可以链接到应用商店中我的应用页面,并让用户从那里点击到“审查这款应用”屏幕。问题是是否有可能直接链接到“审查这个应用程序”屏幕,这样他们就不需要点击任何东西。
我想把一个“率/审查这个应用程序”功能到我的应用程序。
是否存在一种方法能够直接链接到应用商店中他们评论应用的屏幕?所以用户不需要点击主应用程序链接。谢谢。
编辑:由于缺乏回应,开始赏金。为了确保这一点非常清楚:我知道我可以链接到应用商店中我的应用页面,并让用户从那里点击到“审查这款应用”屏幕。问题是是否有可能直接链接到“审查这个应用程序”屏幕,这样他们就不需要点击任何东西。
当前回答
斯威夫特3
fileprivate func openAppStore() {
let appId = "YOUR_APP_ID"
let url_string = "itms-apps://itunes.apple.com/app/id\(appId)"
if let url = URL(string: url_string) {
UIApplication.shared.openURL(url)
}
}
其他回答
已接受的答案未能加载“评审”选项卡。我发现下面的方法加载“审查”标签没有“详细信息”标签。
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id={APP_ID}&pageNumber=0&sortOrdering=2&mt=8"]];
将{APP_ID}替换为你的app store app id。
使用这个URL对我来说是完美的解决方案。它将用户直接带到Write a Review部分。感谢@Joseph Duffy。必须努力
URL = itms-apps://itunes.apple.com/gb/app/idYOUR_APP_ID_HERE?action=write-review&mt=8 用你的AppId替换YOUR_APP_ID_HERE
对于一个示例代码,请尝试这样做:
Swift 3, Xcode 8.2.1:
let openAppStoreForRating = "itms-apps://itunes.apple.com/gb/app/id1136613532?action=write-review&mt=8"
if let url = URL(string: openAppStoreForRating), UIApplication.shared.canOpenURL(url) {
UIApplication.shared.openURL(url)
} else {
showAlert(title: "Cannot open AppStore",message: "Please select our app from the AppStore and write a review for us. Thanks!!")
}
这里showAlert是UIAlertController的自定义函数。
在iOS 8和iOS 9上,Swift 2版本会将你带到应用的评论页面:
let appId = "YOUR_APP_ID"
let url = "itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=\(appId)"
UIApplication.sharedApplication().openURL(NSURL(string: url)!)
Swift 2版本
func jumpToAppStore(appId: String) {
let url = "itms-apps://itunes.apple.com/app/id\(appId)"
UIApplication.sharedApplication().openURL(NSURL(string: url)!)
}
我在iOS 10中也有同样的问题,我可以打开iTunes费率部分调用:
http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=YOUR_APP_ID&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=7
基本上它把最后一个url变量改为"mt=7"
干杯