如果用户已经评分,则禁止从用户那里获取应用评论
Disable getting app review from user if the user has already rated
我有一个问题,我需要一个建议
我使用这些代码从用户那里获得应用评论,它写在应用委托中并计算用户打开应用的次数。
if currentLaunchingCount == 10 || currentLaunchingCount == 20 || currentLaunchingCount == 30 || currentLaunchingCount == 40 || currentLaunchingCount == 50 || currentLaunchingCount == 60 || currentLaunchingCount == 70 || currentLaunchingCount == 80 || currentLaunchingCount == 90 || currentLaunchingCount == 100 {
SKStoreReviewController.requestReview()
}
效果不错,就是不知道,如果用户评价过,会不会再出现?如果可以,我该如何禁用它。
我也需要一个建议,我真的不喜欢我的代码,它太长了,我怎样才能让它更短?我想说什么时候 currentLaunchingCount
等于 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 求复习。
谢谢:)
Apple 会为您处理 "has this person already rated" 部分。
If the user hasn't already given feedback, the system displays an
in-app prompt that asks for a rating and an optional written review.
关于你的 if 语句,使用模数 (%
):
if currentLaunchingCount > 0 && currentLaunchingCount % 10 == 0 { ... }
根据 Alexander 的评论更新(今天我了解到...)
0 < currentLaunchingCount.isMultiple && currentLaunchingCount.isMultiple(of: 10)
关于不使用逻辑的评论,我先引用HIG的Apple:
Don’t be a pest. Repeated rating prompts can be irritating, and may
even negatively influence the user’s opinion of your app. Allow at
least a week or two between rating requests and only prompt again
after the user has demonstrated additional engagement with your app.
这纯粹是主观的,请随意忽略我。但是,它们是正确的,因为您应该给用户一些时间来进入您的应用程序(假设这是相关的)。假设他们已经使用了 x 次,然后找到一个用户可能对您的应用感到满意的好地方,然后询问。
如果您在我启动您的应用程序时立即弹出提示,那么我希望您喜欢 1 星。
关于显示提示还有一些额外的逻辑(最重要的是,你的应用程序每年只能显示 3 次)并且正如 rmaddy 在他的评论中提到的那样,Apple 在我们不知道的后台进行处理,这将也会影响显示您的提示。没有 Apple 徽章,我无法与 what 对话....
我有一个问题,我需要一个建议
我使用这些代码从用户那里获得应用评论,它写在应用委托中并计算用户打开应用的次数。
if currentLaunchingCount == 10 || currentLaunchingCount == 20 || currentLaunchingCount == 30 || currentLaunchingCount == 40 || currentLaunchingCount == 50 || currentLaunchingCount == 60 || currentLaunchingCount == 70 || currentLaunchingCount == 80 || currentLaunchingCount == 90 || currentLaunchingCount == 100 {
SKStoreReviewController.requestReview()
}
效果不错,就是不知道,如果用户评价过,会不会再出现?如果可以,我该如何禁用它。
我也需要一个建议,我真的不喜欢我的代码,它太长了,我怎样才能让它更短?我想说什么时候 currentLaunchingCount
等于 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 求复习。
谢谢:)
Apple 会为您处理 "has this person already rated" 部分。
If the user hasn't already given feedback, the system displays an in-app prompt that asks for a rating and an optional written review.
关于你的 if 语句,使用模数 (%
):
if currentLaunchingCount > 0 && currentLaunchingCount % 10 == 0 { ... }
根据 Alexander 的评论更新(今天我了解到...)
0 < currentLaunchingCount.isMultiple && currentLaunchingCount.isMultiple(of: 10)
关于不使用逻辑的评论,我先引用HIG的Apple:
Don’t be a pest. Repeated rating prompts can be irritating, and may even negatively influence the user’s opinion of your app. Allow at least a week or two between rating requests and only prompt again after the user has demonstrated additional engagement with your app.
这纯粹是主观的,请随意忽略我。但是,它们是正确的,因为您应该给用户一些时间来进入您的应用程序(假设这是相关的)。假设他们已经使用了 x 次,然后找到一个用户可能对您的应用感到满意的好地方,然后询问。
如果您在我启动您的应用程序时立即弹出提示,那么我希望您喜欢 1 星。
关于显示提示还有一些额外的逻辑(最重要的是,你的应用程序每年只能显示 3 次)并且正如 rmaddy 在他的评论中提到的那样,Apple 在我们不知道的后台进行处理,这将也会影响显示您的提示。没有 Apple 徽章,我无法与 what 对话....