英文:
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都不会向应用程序开发人员返回用户是否已经留下评论以及他们可能给出了什么评级的结果。这是为了防止应用程序开发人员滥用。
要再次看到评论提示,您应该为用户删除评论。此外,两个平台还有其他指南;它们以不同的方式限制用户看到评论提示的次数(每个应用程序版本、每年等等)。
参见:
- https://developer.android.com/guide/playcore/in-app-review/test#troubleshooting('问题:用户已经对应用程序进行了评论。')
- https://developer.apple.com/documentation/storekit/requesting_app_store_reviews
英文:
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:
- https://developer.android.com/guide/playcore/in-app-review/test#troubleshooting ('Issue: The user has already reviewed the app.')
- https://developer.apple.com/documentation/storekit/requesting_app_store_reviews
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论