【问题标题】:open write review page using SKStore​Review​Controller with query parameters "action=write-review"使用带有查询参数“action=write-review”的 SKStore​Review​Controller 打开写评论页面
【发布时间】:2018-04-30 11:11:54
【问题描述】:

https://developer.apple.com/documentation/storekit/skstorereviewcontroller/2851536-requestreview

Apple 文档建议自动打开一个页面,用户可以在该页面上写评论 App Store,将查询参数 action=write-review 附加到您的 产品网址。

我想重定向用户在应用商店上写应用的评论页面。 我是 iOS 新手,请指导我实现此功能。

谢谢。

【问题讨论】:

  • 什么功能?使用SKStoreReviewController 或在应用的设置页面中添加链接?
  • SKStoreReviewController - 但默认显示弹出窗口为“享受应用程序?” 5开始显示提交选项。但我想重定向用户以在苹果显示此对话框时编写评论。Apple记录了您可以传递“action = write-review”参数但我无法找到任何功能SKStoreReviewController。

标签: ios swift review skstorereviewcontroller


【解决方案1】:

这是我正在使用的东西

let appID = "Your App ID on App Store"
let urlStr = "itms-apps://itunes.apple.com/app/id\(appID)?action=write-review" 
if let url = URL(string: urlStr), UIApplication.shared.canOpenURL(url) {
    if #available(iOS 10.0, *) {
        UIApplication.shared.open(url, options: [:], completionHandler: nil)
    } else {
        UIApplication.shared.openURL(url)
    }
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-02-05
    • 2021-01-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多