开始
复制一个带有安装步骤和该插件的完整Markdown指南的设置提示。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-in-app-review`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/in-app-review/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
您可以使用我们的AI辅助设置来安装插件。将Capgo技能添加到您的AI工具中,使用以下命令:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins然后使用以下提示:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-in-app-review` plugin in my project.如果您更喜欢手动设置,请按照以下命令安装插件并遵循以下平台特定的说明:
bun add @capgo/capacitor-in-app-reviewbunx cap sync导入
导入import { CapgoInAppReview } from '@capgo/capacitor-in-app-review';API概述
API概述requestReview
请求评论从用户处请求应用内评论。
This method triggers the native in-app review dialog provided by the platform. On iOS, it uses SKStoreReviewController. On Android, it uses the Play In-App Review API.
重要说明:
- 应用内评论对话框可能不会每次被显示。 苹果和谷歌都有相关的指南,限制了对话框的显示频率。
- 用户看到评论提示的概率不确定。
- 即使对话框未显示,方法也会成功返回。
- 不要在用户操作(如按钮点击)之后调用本方法。 相反,在应用的自然流程中调用它。
import { CapgoInAppReview } from '@capgo/capacitor-in-app-review';
// Request a review at an appropriate moment in your appawait CapgoInAppReview.requestReview();本页面是由插件的 src/definitions.ts. 当公有 API 上游发生变化时,请重新运行同步。
继续从 Getting Started
标题:继续从 Getting Started如果您正在使用 开始使用 来规划商店批准和分发,连接它到 使用 @capgo/capacitor-in-app-review 为使用 @capgo/capacitor-in-app-review 的原生能力 使用 @capgo/capacitor-in-app-review 为 @capgo/capacitor-in-app-review 的实现细节 使用 @capgo/capacitor-native-market 为 @capgo/capacitor-native-market 的实现细节 使用@capgo/capacitor-native-market 为@capgo/capacitor-native-market提供的原生能力 Capacitor 应用内评分 OTA 更新:App Store 审核指南 为Capacitor OTA Updates: App Store Approval Guide提供的实用背景