`expo-store-review` 在调用 `StoreReview.requestReview()` 时不起作用。

huangapple go评论63阅读模式
英文:

expo-store-review not working when StoreReview.requestReview()

问题

以下是您要翻译的代码部分:

I am runing the following function to request User review. My app.json has the appstoreUrl and playstore one, I don't know why the function StoreReview.requestReview() is returning undefined and of course not showing any modal. This is my function for requesting a review

const handleReview = async () => {
  StoreReview.hasAction().then((hasAction) => {
    if (hasAction) {
      StoreReview.requestReview().then((res) => {
        console.log('Response is...', res)
      }).catch((error) => {
        console.log(error);
      });
    } else {
      const reviewUrl = Platform.OS === 'ios' ? Constants.manifest.extra.ios_review_url : Constants.manifest.extra.android_review_url;
      Linking.openURL(reviewUrl);
    }
  })
}
Does it matter if I already did a review? Please bare in mind that here I am trying to work with Expo without going into a managed workflow

希望这对您有所帮助。

英文:

I am runing the following function to request User review. My app.json has the appstoreUrl and playstore one, I don't know why the function StoreReview.requestReview() is returning undefined and of course not showing any modal. This is my function for requesting a review

const handleReview = async () => {
  StoreReview.hasAction().then((hasAction) => {
    if (hasAction) {
      StoreReview.requestReview().then((res) => {
        console.log('Response is...', res)
      }).catch((error) => {
        console.log(error);
      });
    } else {
      const reviewUrl = Platform.OS === 'ios' ? Constants.manifest.extra.ios_review_url : Constants.manifest.extra.android_review_url;
      Linking.openURL(reviewUrl);
    }
  })
}

Does it matter if I already did a review? Please bare in mind that here I am trying to work with Expo without going into a managed workflow

答案1

得分: 2

Yes, it matters that you have already done a review. StoreReview是一个封装了App Store和Play Store API的工具。它们都使用自己的内部逻辑来决定何时向用户显示评论提示,如果用户已经留下了评论,它们都不会显示提示。

出于设计考虑,这两个API都不会向应用程序开发人员返回用户是否已经留下评论以及他们可能给出了什么评级的结果。这是为了防止应用程序开发人员滥用。

要再次看到评论提示,您应该为用户删除评论。此外,两个平台还有其他指南;它们以不同的方式限制用户看到评论提示的次数(每个应用程序版本、每年等等)。

参见:

英文:

Yes, it matters that you have already done a review. StoreReview is a wrapper around the App Store and Play Store APIs. Both of these use their own internal logic to decide when to present the review prompt to the user, and both of them will not show the prompt if the user has already left a review.

By design, neither API returns a result to the app developer indicating whether they have left a review or what rating they may have given. This is to prevent abuse by app developers.

In order to see the review prompt again, you should delete the review for the user. There are other guidelines as well; both platforms limit the number of times the user has seen the review prompt in different ways (# of times per app version, per year, etc).

See:

huangapple
  • 本文由 发表于 2023年3月7日 06:02:12
  • 转载请务必保留本文链接:https://go.coder-hub.com/75656237.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定