@capawesome/capacitor-app-review
v8.0.2
Published
Capacitor plugin that allows users to submit app store reviews and ratings on Android and iOS.
Maintainers
Readme
Capacitor App Review Plugin
Capacitor plugin that allows users to submit app store reviews and ratings.
Use Cases
The App Review plugin is typically used to collect more app store ratings and reviews, for example:
- In-app review prompts: Ask for a rating at a positive moment, such as after a completed task, without the user leaving the app.
- Rate this app button: Open the app store page directly from a button in your settings or about screen.
- Feedback flows: Route satisfied users from your own feedback dialog to the native review dialog or the app store review page.
Compatibility
| Plugin Version | Capacitor Version | Status | | -------------- | ----------------- | -------------- | | 8.x.x | >=8.x.x | Active support |
Installation
You can use our AI-Assisted Setup to install the plugin. Add the Capawesome Skills to your AI tool using the following command:
npx skills add capawesome-team/skills --skill capacitor-pluginsThen use the following prompt:
Use the `capacitor-plugins` skill from `capawesome-team/skills` to install the `@capawesome/capacitor-app-review` plugin in my project.If you prefer Manual Setup, install the plugin by running the following commands and follow the platform-specific instructions below:
npm install @capawesome/capacitor-app-review
npx cap syncAndroid
Variables
If needed, you can define the following project variable in your app’s variables.gradle file to change the default version of the dependency:
$androidPlayReviewVersionversion ofcom.google.android.play:review(default:2.0.2)
This can be useful if you encounter dependency conflicts with other plugins in your project.
Configuration
No configuration required for this plugin.
Usage
The following examples show how to request an in-app review and open the app store page.
Request an in-app review
Show the native in-app review dialog so the user can rate your app without leaving it. Note that on iOS, review requests are limited to 3 requests per year. Only available on Android, and on iOS 14 and later:
import { AppReview } from '@capawesome/capacitor-app-review';
const requestReview = async () => {
await AppReview.requestReview();
};Open the app store page
Open the App Store page for the current app and, if possible, open the dialog to leave a review. On iOS, you can pass the Apple ID of your app via the appId option. Only available on Android and iOS:
import { AppReview } from '@capawesome/capacitor-app-review';
const openAppStore = async () => {
await AppReview.openAppStore();
};API
openAppStore(...)
openAppStore(options?: OpenAppStoreOptions | undefined) => Promise<void>Open the App Store page for the current app and, if possible, open the dialog to leave a review.
Only available on Android and iOS.
| Param | Type |
| ------------- | ------------------------------------------------------------------- |
| options | OpenAppStoreOptions |
Since: 6.0.0
requestReview()
requestReview() => Promise<void>Request an in-app review.
Attention: On iOS, review requests are limited to 3 requests per year.
Only available on Android and iOS (14+).
Since: 6.0.0
Interfaces
OpenAppStoreOptions
| Prop | Type | Description | Since |
| ----------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| appId | string | The app ID of the app to open in the App Store. On iOS, this is the Apple ID of your app (e.g. 123456789). You can find the ID in the URL of your app store entry (e.g. https://apps.apple.com/app/id123456789). Only available on iOS. | 6.0.1 |
Testing
In order to test the In-App Review functionality, you need to follow the instructions provided by the respective platform:
FAQ
Why is the in-app review dialog not showing up?
The operating system decides whether the review dialog is actually displayed. On iOS, review requests are limited to 3 requests per year, so the dialog may not appear every time you call requestReview(). Both platforms also have special requirements for testing, see the Testing section for the official instructions.
What is the difference between requestReview and openAppStore?
The requestReview() method shows the native in-app review dialog, so the user can rate your app without leaving it. The openAppStore(...) method opens the App Store page for the current app and, if possible, opens the dialog to leave a review there. Use requestReview() for gentle prompts and openAppStore(...) for an explicit "Rate this app" button.
Do I need to provide an appId?
Only on iOS, where the appId option of openAppStore(...) is the Apple ID of your app (e.g. 123456789). You can find the ID in the URL of your app store entry (e.g. https://apps.apple.com/app/id123456789).
How can I test the in-app review functionality?
You need to follow the instructions provided by the respective platform, since in-app reviews behave differently in development and production environments. The official testing guides for Android and iOS are linked in the Testing section.
Which platforms are supported?
The plugin supports Android and iOS. The requestReview() method requires iOS 14 or later, and the openAppStore(...) method is available on Android and iOS.
Can I use this plugin with Ionic, React, Vue or Angular?
Yes, the plugin is framework-agnostic. It works in any Capacitor app regardless of the web framework, including Ionic with Angular, React, or Vue, as well as plain JavaScript projects.
Related Plugins
- App Update: Assist your users with native app updates.
- Badge: Access and update the badge number of the app icon.
- Install Referrer: Read install attribution data from the Play Install Referrer and Apple Ad Services.
Newsletter
Stay up to date with the latest news and updates about the Capawesome, Capacitor, and Ionic ecosystem by subscribing to our Capawesome Newsletter.
Changelog
See CHANGELOG.md.
License
See LICENSE.
