MinaSamir11 / react-native-in-app-review

The Google Play In-App Review API, App store rating API lets you prompt users to submit Play Store or App store ratings and reviews without the inconvenience of leaving your app or game.
MIT License
647 stars 57 forks source link

Promise appears to resolve with a string rather than a boolean in iOS #117

Closed mmiller42 closed 2 years ago

mmiller42 commented 2 years ago

I'm running react-native@0.65.1 with react-native-in-app-review@4.1.1. I noticed during development that await InAppReview.RequestInAppReview() would return true on Android and "true" on iOS.

I also was wondering if you were able to clarify further what the meaning of this boolean return value is exactly. From the docs, it sounds like neither the App Store nor the Play Store actually indicate via API whether the user responded, or even if the prompt was shown at all.

So will this promise just always resolve with true or reject with an Error? Or what does resolving with false mean?

MinaSamir11 commented 2 years ago

It return true in case of review flow launched to user successfully (iOS). when return true in android it means user finished or close review flow.

let's say returning boolean it helps you to take an action if you need, such like to save date when review launched to user to ask him later to rate after a month 2 month,etc..

it return false is case of android only, api says review flow is successfully or not after checking that there is no error occurs while launching review.

Otherwise, we return an error occurs, while launching review which mean also that review flow didn't launched successfully yet, before callback return true or false(android).