我想把一个“率/审查这个应用程序”功能到我的应用程序。

是否存在一种方法能够直接链接到应用商店中他们评论应用的屏幕?所以用户不需要点击主应用程序链接。谢谢。

编辑:由于缺乏回应,开始赏金。为了确保这一点非常清楚:我知道我可以链接到应用商店中我的应用页面,并让用户从那里点击到“审查这款应用”屏幕。问题是是否有可能直接链接到“审查这个应用程序”屏幕,这样他们就不需要点击任何东西。


当前回答

所有以前的链接不再直接到“评论”标签,

这个链接将直接指向“评论标签”: ​

https://itunes.apple.com/app/viewContentsUserReviews?id=AppID

or ​

itms-apps: / / itunes.apple.com/app/viewContentsUserReviews ? id = AppID

其他回答

使用这个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的自定义函数。

Swift 5在iOS14中测试

打开5颗星的回顾窗口

private func openReviewInAppStore() {
    let rateUrl = "itms-apps://itunes.apple.com/app/idYOURAPPID?action=write-review"
    if UIApplication.shared.canOpenURL(URL.init(string: rateUrl)!) {
        UIApplication.shared.open(URL.init(string: rateUrl)!, options: [:], completionHandler: nil)
    }
}

上面写的一切都是正确的。这只是一个插入到应用中的示例,并将{YOUR app ID}更改为实际的应用ID,从iTunesconnect中获取,以显示评论页面。请注意,正如上面所评论的,它不能在模拟器上工作-只是在设备上。

修正,因为iOS 7的变化。 修正iOS 10+ openURL更改 对于iOS 13.6+的审查URL是可以访问的,在版本6.0之前使用。它直接开到评论页面。代码更新

    NSString * appId = @"{YOUR APP ID}";
    NSString * theUrl = [NSString  stringWithFormat:@"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=%@&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software",appId];
    int vers = (int) [[UIDevice currentDevice].systemVersion integerValue];
    if (vers > 6 && vers < 12 ) theUrl = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/app/id%@",appId];
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:theUrl] options:@{} completionHandler:nil];

更新:

Swift 5.1, Xcode 11

在Real Device iOS 13.0上测试(保证正常工作)

import StoreKit

func rateApp() {

    if #available(iOS 10.3, *) {

        SKStoreReviewController.requestReview()
    
    } else {

        let appID = "Your App ID on App Store"
        let urlStr = "https://itunes.apple.com/app/id\(appID)" // (Option 1) Open App Page    
        let urlStr = "https://itunes.apple.com/app/id\(appID)?action=write-review" // (Option 2) Open App Review Page
        
        guard let url = URL(string: urlStr), UIApplication.shared.canOpenURL(url) else { return }
        
        if #available(iOS 10.0, *) {
            UIApplication.shared.open(url, options: [:], completionHandler: nil)
        } else {
            UIApplication.shared.openURL(url) // openURL(_:) is deprecated from iOS 10.
        }
    }
}

在iOS7中,将你的应用程序切换到app Store进行费率和审查的URL已经更改:

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

APP_ID需要替换为您的应用程序ID。

对于iOS 6和更老版本,之前答案中的URL工作正常。

来源:Appirater

享受编码. . ! !