This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Expo StoreReview
一个库,提供对原生 API 的访问以进行应用内评论。
expo-store-review 是一个库,它在 Android 5 及以上版本提供对 ReviewManager API 的访问,在 iOS 上提供对 SKStoreReviewController API 的访问。它允许你在不离开应用的情况下请求用户对你的应用进行评分。
安装
🌐 Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
用法
🌐 Usage
在使用此 API 时,遵循 iOS 的人机界面指南和 Android 的指南非常重要。
🌐 It is important that you follow the Human Interface Guidelines for iOS and Guidelines for Android when using this API.
具体来说:
- 不要从按钮调用
StoreReview.requestReview()——相反,尝试在用户完成应用中的某些签名操作后调用它。 - 不要向用户发送垃圾邮件。
- 当用户正在执行诸如导航之类的时间敏感操作时,请勿请求审核。
- 在展示评级按钮或卡片之前或期间,请勿询问用户任何问题。
撰写评论
🌐 Write reviews
安卓
🌐 Android
在 Android 上没有等效的重定向,你仍然可以使用查询参数 showAllReviews=true 打开 Play 商店的评论部分,方法如下:
🌐 There is no equivalent redirect on Android, you can still open the Play Store to the reviews sections using the query parameter showAllReviews=true like this:
iOS
你可以通过使用查询参数 action=write-review 将应用用户重定向到 iOS 应用商店中一个应用的 “撰写评论” 页面。例如:
🌐 You can redirect an app user to the "Write a Review" screen for an app in the iOS App Store by using the query parameter action=write-review. For example:
应用接口
🌐 API
import * as StoreReview from 'expo-store-review';
No API data file found, sorry!
错误代码
🌐 Error codes
ERR_STORE_REVIEW_FAILED
当商店审核请求不成功时会出现此错误。
🌐 This error occurs when the store review request was not successful.