react-native-in-app-review
Advanced tools
Comparing version 2.0.2 to 2.0.3
12
index.js
@@ -5,5 +5,5 @@ import React from "react"; | ||
const { InAppReviewModule, InAppReview } = NativeModules; | ||
const { InAppReviewModule, RNInAppReviewIOS } = NativeModules; | ||
const isAvailable = !!InAppReview && InAppReview.isAvailable; //ios version check | ||
const isAvailable = !!RNInAppReviewIOS && RNInAppReviewIOS.isAvailable; //ios version check | ||
@@ -19,3 +19,3 @@ function isVersionAvailable() { | ||
} else if (Platform.OS === "ios") { | ||
if (!InAppReview) { | ||
if (!RNInAppReviewIOS) { | ||
throw new Error( | ||
@@ -31,6 +31,6 @@ "InAppReview native module not available, did you forget to link the library?" | ||
static RequestInAppReview() { | ||
if (isVersionAvailable()) { | ||
if (Platform.OS === "android" && isVersionAvailable()) { | ||
InAppReviewModule.show(); | ||
} else if (isVersionAvailable()) { | ||
InAppReview.show(); | ||
} else if (Platform.OS === "ios" && isVersionAvailable()) { | ||
RNInAppReviewIOS.requestReview(); | ||
} | ||
@@ -37,0 +37,0 @@ } |
{ | ||
"name": "react-native-in-app-review", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "react native in app review, to rate on Play store, App Store, Generally, the in-app review flow (see figure 1 for play store, figure 2 for ios) can be triggered at any time throughout the user journey of your app. During the flow, the user has the ability to rate your app using the 1 to 5 star system and to add an optional comment for play store only. Once submitted, the review is sent to the Play Store or App store and eventually displayed.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
22638