跳到正文
返回博客
·约 4 分钟读完

iOS 评分和评论:在 App 里请求评分、回复评论、重置评分

用 SwiftUI 的 requestReview 请求 App Store 评分的时机和方法,365 天最多三次的限制,在 App Store Connect 回复评论、重置汇总评分,以及举报评论。

在 App 里请求评分,要用系统提供的弹窗:SwiftUI 里从环境读取 requestReview 再调用它。弹窗到底出不出现由 StoreKit 决定;Apple 说,对还没在这台设备上给你评过分的人,最多"a maximum of three times within a 365-day period"(365 天内三次)。只在用户用了一段时间之后再请求,不要在首次启动时请求,也不要绑在按钮上。自己做的评分弹窗不被允许(准则 5.6.1)。在 App Store Connect 里,你可以公开回复评论;发布新版本时可以重置汇总评分(之后无法恢复);违规的评论可以举报。

在 App 里请求评分

用哪个 API

API适用范围状态
RequestReviewAction,以 @Environment(\.requestReview) 读取SwiftUI:iOS 16、iPadOS 16、Mac Catalyst 16、macOS 13、visionOS 1当前推荐
AppStore.requestReview(in:)UIKit,需要传入窗口场景当前可用;UIKit 代码里 Apple 用它替代旧类
SKStoreReviewController.requestReview(in:)iOS 10.3 到 18在 iOS 18、macOS 15、visionOS 2 中已弃用

它们都只是请求弹窗。Apple:"App Store policy governs the actual display of a rating and review request view."(弹窗是否真正显示,由 App Store 的政策决定。)

弹窗多久出现一次

摘自 Apple 的 RequestReviewAction 文档:

  • "If the person hasn't rated or reviewed your app on this device, StoreKit displays the ratings and review request a maximum of three times within a 365-day period."(用户还没在这台设备上评分或评论过,365 天内最多显示三次。)
  • "If the person has rated or reviewed your app on this device, StoreKit displays the ratings and review request if the app version is new, and if more than 365 days have passed since the person's previous review."(已经评过的,要等到 App 有新版本、且距上次评论超过 365 天,才会再显示。)

人机界面指南还提到,用户可以对所有 App 关闭这类弹窗。所以一次调用可能什么都不显示,而且 App 不会知道弹窗有没有出现,Apple 的文档也没有提供查询办法。

由此带来的几条规则

  • 不要绑在按钮上。 Apple:"Because this API may not present an alert, don't call it in response to a button tap or other user action."(这个 API 可能不弹窗,所以不要在用户点按钮或其他操作时调用。)一个一半时间没反应的"给我们评分"按钮,看起来就是坏的。
  • 按钮改成跳转 App Store。 Apple 建议在设置里放一个固定链接:在产品页地址后加上查询参数 action=write-review,会直接打开 App Store 的写评论页面。
  • 测试。 开发模式下"StoreKit always displays the rating and review request view"(总会显示弹窗);但在 TestFlight 分发的测试版里"has no effect"(不起作用)。TestFlight 里看不到弹窗是正常的。
  • 只能用 Apple 的弹窗。 准则 5.6.1:"Use the provided API to prompt users to review your app ... we will disallow custom review prompts."(请用提供的 API 请求评论……自定义评论弹窗不被允许。)

SwiftUI 示例

下面的代码在第三次导出完成后请求评分,每个 App 版本最多一次,并在结果出现两秒后再请求。另有一个设置页链接,方便想随时写评论的人。

import SwiftUI
import StoreKit

struct ExportFinishedView: View {
    @Environment(\.requestReview) private var requestReview
    @AppStorage("completedExports") private var completedExports = 0
    @AppStorage("lastReviewPromptVersion") private var lastPromptVersion = ""

    var body: some View {
        Text("Export saved")
            .task { await askIfAppropriate() }
    }

    private func askIfAppropriate() async {
        completedExports += 1
        let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? ""
        // Ask only after real use, and at most once per app version.
        guard completedExports >= 3, version != lastPromptVersion else { return }
        // Give the person a moment to see the result first.
        try? await Task.sleep(for: .seconds(2))
        guard !Task.isCancelled else { return }
        lastPromptVersion = version
        requestReview()
    }
}

struct RateAppButton: View {
    // Replace 1234567890 with your app's Apple ID.
    let url = URL(string: "https://apps.apple.com/app/id1234567890?action=write-review")!
    var body: some View {
        Link("Write a review", destination: url)
    }
}

我们核实了什么:这段代码用 swiftc -typecheck 针对 Xcode 自带的 iOS 27.1 SDK(Swift 6.4)、目标 arm64-apple-ios17.0 做了类型检查,默认语言模式和 Swift 6 模式都没有错误或警告。没有在真机上运行,所以弹窗会不会出现,仍按上面说的由 StoreKit 决定。"三次导出"和"每个版本一次"是我们的选择,不是 Apple 的要求;请按你的 App 挑合适的时机。

什么时候请求,什么时候别请求

摘自人机界面指南"Ratings and reviews":

  • 用户真正用起来之后。 "Ask for a rating only after people have demonstrated engagement with your app or game"(只在用户表现出投入之后请求),比如打完一关或完成"a significant task"(一项重要任务)之后。
  • 不要在首次启动或新手引导时请求。 这时用户还没形成看法,Apple 说过早请求,用户"may even be more likely to leave negative feedback"(甚至更可能给差评)。
  • 不要打断正在进行的任务。 "Look for natural breaks or stopping points"(找自然的停顿点)。
  • 不要太频繁。 "Consider allowing at least a week or two between requests"(两次请求之间至少隔一两周),并在用户进一步使用之后再请求。
  • 用系统弹窗。 系统会检查用户之前有没有评过,并限制在"three occurrences per app within a 365-day period"(每个 App 365 天三次)。

App 审核准则里还有:

  • 准则 3.2.2(x):"Apps must not force users to rate the app, review the app, download other apps, or other store-related actions in order to access functionality, content, or use of the app."(不得强迫用户评分、评论、下载其他 App 等,才能使用功能或内容。)
  • 准则第 3 部分(商业)开头警告,用"paid, incentivized, filtered, or fake feedback"(付费、激励、筛选或虚假的反馈)操纵评论,可能被移出 Apple Developer Program;5.6.3 禁止操纵"charts, search, reviews, or referrals"(排行榜、搜索、评论或推荐)。先问"喜欢这个 App 吗?",只把回答"喜欢"的人送去评分,就属于筛选。

Apple 的评分页面还有一条建议:在 App 里和产品页上都把支持联系方式放在好找的地方,让不满意的用户先找到你,而不是先去写评论。

回复评论

  • 谁能回复。 Account Holder、Admin 或 Customer Support 角色。
  • 在哪回复。 App Store Connect 里打开 App,侧边栏点 Ratings and Reviews(评分及评论),右上角选平台,找到评论点 Reply(回复)。修改或删除通过 Edit Response。
  • 哪些平台。 Apple 的概览页说 iOS、macOS、watchOS 和 visionOS App 可以回复。tvOS App 用户只能评分,不能写评论。
  • 之后会怎样。 "When you respond to a customer review, the customer is notified and can update their review in response."(你回复后,用户会收到通知,可以更新评论。)短时间内改几次只发一次通知。回复"may take up to 24 hours to appear on the App Store"(最多 24 小时后出现在 App Store),在此之前显示为待处理。
  • 每条评论只显示一条回复,用户修改评论后回复仍然公开显示。改过的回复会标注已编辑。
  • 旧评论也能回。 "You can respond to all reviews of your app, regardless of when they were written"(不论评论是什么时候写的都能回复)。
  • 长度。 Apple 的帮助页面没有说回复的字数上限。
  • 也可以通过 App Store Connect API 回复。

Apple 对回复的要求:

  • 5.6.1:"treat customers with respect ... Keep your responses targeted to the user's comments and do not include personal information, spam, or marketing in your response."(尊重用户……回复要针对用户的评论,不要包含个人信息、垃圾内容或营销内容。)
  • Apple 的评分页面:回复要"concise"(简洁),尽量针对个人而不是套话;回不过来时,先回"the lowest star ratings or those mentioning technical issues with the current version"(星级最低的,或提到当前版本技术问题的)。
  • 更新修好了用户抱怨的问题,就写进版本说明,并考虑回复那些评论告诉他们。
  • 扣费或下载问题: 引导用户联系 Apple 支持,不要试图在回复里解决。

重置汇总评分

每个国家或地区都有自己的汇总评分。发布新版本时可以重置:

  • 谁能操作。 Admin 或 App Manager。
  • 怎么操作。 在 App 版本页面的 Reset Overview Rating(重置总体评分)里,勾选 Reset rating when this version is released(此版本发布时重置评分),然后保存。版本发布时才会重置。
  • 平台。 iOS、macOS 和 tvOS。通用 App 只重置你操作的那个平台;App 套装不能重置。
  • 所有地区同时生效。 "affects all regions or countries simultaneously."
  • 文字评论保留。 重置"won't apply to written customer reviews, which will continue to display on the App Store."(不影响文字评论,评论仍显示在 App Store 上。)
  • 无法撤销。 "Once you release the new version of your app, you won't be able to restore the previous rating."(新版本发布后,原来的评分无法恢复。)
  • 用户看到什么。 产品页上会提示评分最近已重置,直到给新版本评分的人足够多。

Apple 建议"sparingly"(谨慎)使用:人机界面指南说,重置"tends to result in having fewer ratings overall, which can discourage some people from downloading your app."(往往会让总评分数变少,可能让一些人不想下载。)当新版本修好了大多数低分针对的问题时才值得重置,不要当成例行操作。

举报评论

遇到"offensive material, spam, or other content that violates Apple's Terms and Conditions"(冒犯性内容、垃圾内容或其他违反 Apple 条款的内容),Apple 说用 Report a Concern(报告问题)"instead of replying to the review"(而不是回复)。在评分及评论里找到这条评论,点 Report a Concern,选原因、写说明后提交。"The customer who wrote the review won't be notified if you report a concern."(写评论的用户不会收到举报通知。)

产品页上的评论摘要(较新的 iOS 版本上、评论足够多时显示)也能用同样方式举报:在 Review Summaries 下点摘要旁的 …。

宣传材料里可以引用你的评分,前提是它"accurately reflects your app's current rating"(准确反映当前评分);单条评论只有"if permission from the reviewer is granted"(经评论者同意)才能用。

常见问题

为什么评分弹窗不出现?

由 StoreKit 决定。用户可能在过去 365 天里已经看过三次,可能已经给这个版本评过分,也可能关掉了弹窗。TestFlight 里永远不会出现,开发模式下总会出现。

能先显示自己的"喜欢这个 App 吗?"页面吗?

准则 5.6.1 不允许自定义评论弹窗,而只把满意的用户送去评分,正是准则警告的筛选行为。直接在合适的时机用系统弹窗。

设置里的"给 App 评分"按钮能调用 requestReview 吗?

Apple 说不要在点按钮时调用,因为可能什么都不显示。改成带 action=write-review 的产品页链接。

能给评分的用户发奖励吗?

不能。Apple 警告"paid, incentivized, filtered, or fake feedback",3.2.2(x) 也禁止把评分作为使用 App 的条件。

重置评分会删除评论吗?

不会。文字评论仍留在 App Store 上。只有汇总评分重新开始,而且版本发布后原评分无法恢复。

回复有字数限制吗?

Apple 的帮助页面没有说明。

资料来源

均于 2026 年 11 月 1 日查阅。

Apple 关于评分的限制和规则会变,以上面页面的最新内容为准。

作者

独立开发者,在 Obelisk Club 做本地优先的 Mac 与 iOS 效率应用。 关于作者 →