Skip to content

SameerArora497/react-native-app-review

Repository files navigation

@sameerarora/react-native-app-review

React Native In-App Review using the Google Play In-App Review API on Android and SKStoreReviewController on iOS. Built with the React Native Turbo Module architecture (new arch compatible, old arch supported).

Installation

npm install @sameerarora/react-native-app-review

iOS — additional setup

cd ios && pod install

No additional configuration is needed. The StoreKit framework is linked automatically via the podspec.

Android — additional setup

No additional configuration is needed. React Native's autolinking registers the module automatically.

The module depends on com.google.android.play:review:2.0.2, which is declared in the library's build.gradle and resolved from Google's Maven repository (google()). Make sure your root build.gradle includes:

allprojects {
  repositories {
    google()
    mavenCentral()
  }
}

Usage

import { requestReview } from '@sameerarora/react-native-app-review';

async function askForReview() {
  try {
    await requestReview();
  } catch (error) {
    // handle error — see error codes below
    console.warn(error);
  }
}

API

requestReview(): Promise<void>

Triggers the native in-app review flow.

  • Android — launches the Google Play In-App Review bottom sheet.
  • iOS — calls SKStoreReviewController.requestReview(in:).

The promise resolves when the flow is complete (or immediately on iOS). It never resolves with a meaningful value — neither platform tells you whether the user actually submitted a review.

Error codes (Android only)

Code Meaning
ACTIVITY_NOT_FOUND The current Android Activity is null (app is backgrounded or finishing).
REVIEW_FLOW_FAILED The Play In-App Review API returned an error (e.g. not a Play Store build, device not eligible).
UNKNOWN_ERROR Unexpected error.

iOS always resolves — there is no error state to report.

Important notes

Android — Play Store quota

Google Play silently rate-limits how often the review dialog is shown to a single user. Calling requestReview() does not guarantee the dialog appears every time. Do not show UI that implies a review was submitted, and do not call this API on every launch.

Recommended: call it once after a meaningful interaction (e.g. after the user completes their first task, or after N sessions).

iOS — system-controlled prompt

Apple controls whether the review prompt appears. The system may suppress it if:

  • The user has already reviewed this version.
  • The prompt has been shown three times in the past 365 days.
  • The app is not distributed via the App Store.

Do not show custom UI telling the user to expect a dialog.

Requirements

Platform Minimum version
iOS 14.0
Android API 24 (Android 7.0)
React Native 0.71+ (new arch) / 0.68+ (old arch)

Contributing

Pull requests are welcome. For major changes please open an issue first to discuss what you'd like to change.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors